version 1.1
-mount device on UUID
-edit fsab
-set/edit label for device
-support MMC(Formuler)
- support internal HDD ет8000/8500/10000
Geplaatst op 15 maart 2015 - 21:25
Geplaatst op 15 maart 2015 - 21:45
Geplaatst op 16 maart 2015 - 08:07
This is a simple and handy plugin for normal users who do not understand anything in Linux.
I think for python-libmount that you need a separate plugin.
GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K
Geplaatst op 16 maart 2015 - 11:48
I do not understand what are problems of eConsoleAppContainer mentioned by athoik,agree it is more stable than os.system and more flexible to handle any situation and has advantage to monitor progression of execution
os.system has advantage on (some situation) that the code execution stopped until command execution finished but this can be accomplished in eConsoleAppContainer by enigma.eConsoleAppContainer.appClosed and returned data handled by enigma.eConsoleAppContainer.dataAvail
Geplaatst op 16 maart 2015 - 17:18
https://raw.githubusercontent.com/ox-it/python-libmount/master/libmount/mounting.py import ctypes _libc = ctypes.cdll.LoadLibrary("libc.so.6") # Simple wrapper around mount(2) and umount(2). # Not thoroughly tested, and not very talkative. class FLAGS: def __new__(self): raise NotImplementedError("This class is non-instantiable.") def flag_bits(count): flag = 1 for i in range(count): yield flag flag <<= 1 ( MS_RDONLY, # 0 MS_NOSUID, # 1 MS_NODEV, # 2 MS_NOEXEC, # 3 MS_SYNCHRONOUS, # 4 MS_REMOUNT, # 5 MS_MANDLOCK, # 6 MS_DIRSYNC, # 7 _, _, # SKIP 8, 9 MS_NOATIME, # 10 MS_NODIRATIME, # 11 MS_BIND, # 12 MS_MOVE, # 13 MS_REC, # 14 MS_SILENT, # 15 MS_POSIXACL, # 16 MS_UNBINDABLE, # 17 MS_PRIVATE, # 18 MS_SLAVE, # 19 MS_SHARED, # 20 MS_RELATIME, # 21 MS_KERNMOUNT, # 22 MS_I_VERSION, # 23 MS_STRICTATIME, # 24 _, _, _, _, _, # SKIP 25-29 MS_ACTIVE, # 30 MS_NOUSER, # 31 ) = flag_bits(32) del flag_bits, _ MS_MGC_VAL = 0xc0ed0000 MS_MGC_MSK = 0xffff0000 def mount(source, target, fstype, flags=0, data=None): flags = (flags & FLAGS.MS_MGC_MSK) | FLAGS.MS_MGC_VAL result = _libc.mount(ctypes.c_char_p(source), ctypes.c_char_p(target), ctypes.c_char_p(fstype), flags, ctypes.c_char_p(data) if data is not None else 0) if result != 0: raise OSError(ctypes.get_errno()) def umount(target): result = _libc.umount(ctypes.c_char_p(target)) if result != 0: raise OSError(ctypes.get_errno())
Geplaatst op 16 maart 2015 - 17:49
I do not understand what are problems of eConsoleAppContainer
Geplaatst op 16 maart 2015 - 18:08
I do not understand what are problems of eConsoleAppContainer
I think eConsoleAppContainer cannot return exit code of the process. It might be usefully in some cases. Eg checking what error happened.
may be,i used eConsoleAppContainer to run modules usually
eConsoleAppContainer.execute("python default.py"))
and report errors during execution of default.py and the nice feature you can cancel the execution while we cannot with os.system
Veranderd door mfaraj57, 16 maart 2015 - 18:10
Geplaatst op 18 maart 2015 - 18:35
self.container = eConsoleAppContainer() self.container.appClosed.append(self.runFinished) self.container.execute("the_program") def runFinished(self, retval): if retval != 0: print "the_program exit code:" + str(retval) else: #continue executing commands...Using os.system normaly code goes like this:
retval = os.system("the_program") if reval != 0: print "the_program exit code:" + str(retval) else: #continue executing commands...
Veranderd door athoik, 18 maart 2015 - 18:36
Geplaatst op 18 maart 2015 - 18:37
Otherwise you could still wait()
* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.
Geplaatst op 20 maart 2015 - 08:10
Need help...
-add reset usb device
https://gist.github....aef890469f34d51
""" Example code for resetting the USB port that a Teensy microcontroller is attached to. There are a lot of situations where a Teensy or Arduino can end up in a bad state and need resetting, this code is useful for """ import os import fcntl import subprocess # Equivalent of the _IO('U', 20) constant in the linux kernel. USBDEVFS_RESET = ord('U') << (4*2) | 20 def get_teensy(): """ Gets the devfs path to a Teensy microcontroller by scraping the output of the lsusb command The lsusb command outputs a list of USB devices attached to a computer in the format: Bus 002 Device 009: ID 16c0:0483 Van Ooijen Technische Informatica Teensyduino Serial The devfs path to these devices is: /dev/bus/usb/<busnum>/<devnum> So for the above device, it would be: /dev/bus/usb/002/009 This function generates that path. """ proc = subprocess.Popen(['lsusb'], stdout=subprocess.PIPE) out = proc.communicate()[0] lines = out.split('\n') for line in lines: if 'Teensyduino' in line: parts = line.split() bus = parts[1] dev = parts[3][:3] return '/dev/bus/usb/%s/%s' % (bus, dev) def send_reset(dev_path): """ Sends the USBDEVFS_RESET IOCTL to a USB device. dev_path - The devfs path to the USB device (under /dev/bus/usb/) See get_teensy for example of how to obtain this. """ fd = os.open(dev_path, os.O_WRONLY) try: fcntl.ioctl(fd, USBDEVFS_RESET, 0) finally: os.close(fd) def reset_teensy(): """ Finds a teensy and reset it. """ send_reset(get_teensy())
Show error for 'fcntl.ioctl(fd, USBDEVFS_RESET, 0)':
OSError: [Errno 25] Inappropriate ioctl for device
Who can help?
Veranderd door Dimitrij, 20 maart 2015 - 09:02
GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K
Geplaatst op 20 maart 2015 - 10:07
Either the Broadcom SoC doesn't implement this or the kernel driver.
Resetting the bus is of limited use, by the way, I've been in a similar situation and resetting never worked.
* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.
Geplaatst op 20 maart 2015 - 15:17
The problem is really the very limited USB implementation on the microcontroller side, a reset won't be noticed often. And indeed, apparently Broadcom doesn't implement it.
* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.
Geplaatst op 21 maart 2015 - 14:03
Geplaatst op 5 mei 2015 - 18:00
version 1.5
-fixed definition devices sd*[5-9]
-configurable options for skins:
# skin.xml <parameter name="fstabMenuList" value="0,30,600,50,700,30,500,50" />
# skin.xml <alias name="fstabMenuList" font="Regular" size="28" height="50"/>
Veranderd door Dimitrij, 6 mei 2015 - 09:32
GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K
0 leden, 1 bezoekers, 0 anonieme gebruikers