[Mono-bugs] [Bug 432875] New: System.IO.DriveInfo total size, free space, etc all incorrect
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Oct 7 00:34:53 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=432875
Summary: System.IO.DriveInfo total size, free space, etc all
incorrect
Product: Mono: Class Libraries
Version: 2.0
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: System
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: andrewaggb at shaw.ca
QAContact: mono-bugs at lists.ximian.com
Found By: DeveloperNet
System.IO.DriveInfo gives wrong values for freespace and Totalsize on fedora 9.
df output
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
479550240 84017916 371172596 19% /
/dev/sda1 194442 19629 164774 11% /boot
tmpfs 237404 0 237404 0% /dev/shm
mono output
label / name / driveformat ext3 totalfreespace 9223372036854775807 TotalSize
9223372036854775807
label /dev name /dev driveformat tmpfs totalfreespace 0 TotalSize
9223372036854775807
label /proc name /proc driveformat proc totalfreespace 0 TotalSize
9223372036854775807
label /sys name /sys driveformat sysfs totalfreespace 0 TotalSize
9223372036854775807
label /proc/bus/usb name /proc/bus/usb driveformat usbfs totalfreespace 0
TotalSize 9223372036854775807
label /dev/pts name /dev/pts driveformat devpts totalfreespace 0 TotalSize
9223372036854775807
label /boot name /boot driveformat ext3 totalfreespace 9223372036854775807
TotalSize 9223372036854775807
label /dev/shm name /dev/shm driveformat tmpfs totalfreespace 0 TotalSize
9223372036854775807
label /proc/sys/fs/binfmt_misc name /proc/sys/fs/binfmt_misc driveformat
binfmt_misc totalfreespace 0 TotalSize 9223372036854775807
label /var/lib/nfs/rpc_pipefs name /var/lib/nfs/rpc_pipefs driveformat
rpc_pipefs totalfreespace 0 TotalSize 9223372036854775807
label /sys/fs/fuse/connections name /sys/fs/fuse/connections driveformat
fusectl totalfreespace 0 TotalSize 9223372036854775807
^
sample code to reproduce the problem.
DriveInfo[] dl = DriveInfo.GetDrives();
foreach (DriveInfo d in dl)
{
if (d.IsReady)
{
Console.WriteLine("label " + d.VolumeLabel + " name " +
d.Name + " driveformat " + d.DriveFormat + " totalfreespace " +
d.TotalFreeSpace + " TotalSize " + d.TotalSize);
// Console.WriteLine("Disk Check " +
d.AvailableFreeSpace / 1000000000);
}
}
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list