[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1360: cpio -a option produces spurious messages on read-only fs



Package: cpio
Version: 2.3-2

The manpage says:
       -a, --reset-access-time
              Reset the access times of files after reading them,
              so  that  it does not look like they have just been
              read.

chiark:~> mount
/dev/sda2 on / type ext2 (rw)
/dev/sdb1 on /usr type ext2 (rw)
/dev/sda6 on /var type ext2 (rw)
/dev/hda6 on /var/spool/news type ext2 (rw)
/dev/hda5 on /u type ext2 (rw)
/dev/hda1 on /u/ian type ext2 (rw)
/proc on /proc type proc (rw)
/dev/sda1 on /dos type msdos (rw,umask=007,uid=100,gid=100)
/dev/sda7 on /old type ext2 (ro)
chiark:~> cd /old/
chiark:/old> ll etc/passwd
-rw-r--r--   1 root     root          785 Mar  2  1995 etc/passwd
chiark:/old> echo etc/passwd | cpio -oav -O/dev/null
cpio: etc/passwd: Read-only file system
etc/passwd
2 blocks
chiark:/old> ll -u etc/passwd
-rw-r--r--   1 root     root          785 Jul 20 02:21 etc/passwd
chiark:/old>

If cpio gets EROFS when doing the utime call it should silently ignore
the error, because reading the file won't have upset its timestamps if
it's on a read-only filesystem.

Ian.


Reply to: