[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
df enhancment for removable media
From: |
Juergen Weigert |
Subject: |
df enhancment for removable media |
Date: |
Mon, 19 Sep 2005 19:26:30 +0200 |
Hi coreutils people!
On a recent SUSE Linux df became unreliable for e.g. USB-drives.
This is because hald automatically mounts and unmounts such drives
as they are accessed.
Usually I get something like:
$ df /media/USB_DISK
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 0 0 0 - /media/USB_DISK
only if the USB_DISK is being accessed, I get the expected output.
$ ls /media/USB_DISK > /dev/null; df /media/USB_DISK
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 252522 238718 13804 95% /media/USB_DISK
A simple enhancement for df is to actively access the USB_DISK while running
statfs(). I've added an opendir() call in the attached patch. This can be
suppressed with a new commandline option -n.
Please keep me in CC, I am not subscribed.
thanks,
Jw.
--
o \ Juergen Weigert paint it green! __/ _=======.=======_
<V> | address@hidden wide open suse_/ _---|____________\/
\ | 0911 74053-508 (tm)__/ (____/ /\
(/) | __________________________/ _/ \_ vim:set sw=2 wm=8
coreutils-cvs-df-media-mount.diff
Description: Text document
- df enhancment for removable media,
Juergen Weigert <=