diff --git a/tests/detect-usb.py b/tests/detect-usb.py index 1180a99..504eb01 100755 --- a/tests/detect-usb.py +++ b/tests/detect-usb.py @@ -51,9 +51,9 @@ for device in iter(monitor.poll, None): if partition.device == device.device_node: print("Mounted at {}".format(partition.mountpoint)) statvfs = os.statvfs(partition.mountpoint) - print("size %4.1fGB" % + print("size %4.1fGB" % (statvfs.f_frsize * statvfs.f_blocks // 1024 // 1024 / 1024)) - print("used %4.1fGB" % + print("used %4.1fGB" % (statvfs.f_frsize * (statvfs.f_blocks - statvfs.f_bfree) // 1024 // 1024 / 1024)) found = True loop += 1