Closed GoogleCodeExporter closed 8 years ago
Implemented on Linux in r1026.
I provided an "all" optional argument defaulting to False to filter for
physical devices only.
>>> psutil.disk_partitions()
partition(device='/dev/sda3', mountpoint='/', fstype='ext4')
partition(device='/dev/sda7', mountpoint='/home', fstype='ext4')
partition(device='/dev/sdb1', mountpoint='/media/1CA0-065B', fstype='vfat')
partition(device='/dev/sda6', mountpoint='/media/Dati', fstype='fuseblk')
>>>
>>> psutil.disk_partitions(all=True)
partition(device='/dev/sda3', mountpoint='/', fstype='ext4')
partition(device='proc', mountpoint='/proc', fstype='proc')
partition(device='', mountpoint='/sys', fstype='sysfs')
partition(device='fusectl', mountpoint='/sys/fs/fuse/connections',
fstype='fusectl')
partition(device='', mountpoint='/sys/kernel/debug', fstype='debugfs')
partition(device='', mountpoint='/sys/kernel/security', fstype='securityfs')
partition(device='', mountpoint='/dev', fstype='devtmpfs')
partition(device='', mountpoint='/dev/pts', fstype='devpts')
partition(device='', mountpoint='/dev/shm', fstype='tmpfs')
partition(device='', mountpoint='/var/run', fstype='tmpfs')
partition(device='', mountpoint='/var/lock', fstype='tmpfs')
partition(device='/dev/sda7', mountpoint='/home', fstype='ext4')
partition(device='binfmt_misc', mountpoint='/proc/sys/fs/binfmt_misc',
fstype='binfmt_misc')
partition(device='gvfs-fuse-daemon', mountpoint='/home/giampaolo/.gvfs',
fstype='fuse.gvfs-fuse-daemon')
partition(device='/dev/sdb1', mountpoint='/media/1CA0-065B', fstype='vfat')
partition(device='/dev/sda6', mountpoint='/media/Dati', fstype='fuseblk')
Original comment by g.rodola
on 15 Jun 2011 at 10:00
FreeBSD implementation added as r1027.
Original comment by g.rodola
on 16 Jun 2011 at 10:07
Implemented on Windows in r1030.
Original comment by g.rodola
on 17 Jun 2011 at 6:04
Attached is a patch for OS X support. It is identical to BSD support but I
couldn't find a good way to share code between the BSD and OS X
implementations. That being said, I copied the approach for BSD to implement
OS X support. If you know a better way to do this so that OS X uses the BSD
sources for this, since OS X is a BSD derivative, feel free to just commit your
version.
Original comment by jcscoob...@gmail.com
on 27 Jun 2011 at 4:46
Attachments:
Added in r1047.
As for now I can't think of a smart way to share the same code between OSX and
FreeBSD. I'll think about it later. Closing out as FixedInSvn for now.
Original comment by g.rodola
on 27 Jun 2011 at 4:56
Original comment by g.rodola
on 27 Jun 2011 at 5:52
Original comment by g.rodola
on 8 Jul 2011 at 7:07
[deleted comment]
Updated csets after the SVN -> Mercurial migration:
r1026 == revision 5e77d0b5125a
r1027 == revision d05c75bf4288
r1030 == revision a566c8a5fbf6
r1047 == revision 186496a8bd0f
Original comment by g.rodola
on 2 Mar 2013 at 12:01
Original issue reported on code.google.com by
g.rodola
on 15 Jun 2011 at 9:07Attachments: