[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-cpio] patch for large device number
From: |
Wang Chen |
Subject: |
[Bug-cpio] patch for large device number |
Date: |
Fri, 22 Oct 2004 08:48:13 +0800 |
According to cpio exchange format specification, device numbers are
represented as six octal digits, therefore cpio cannot handle device numbers
more than 18 bits long. But in kernel 2.6, device number is 32 bits.
I made a patch for cpio-2.5-7. If cpio is used in large device number
enviroment, some error messages will come out and the program will abort.
-----------------------------------------------------------------------------
*** copyout.c.bak 2004-10-13 10:46:44.000000000 -0400
--- copyout.c 2004-10-13 10:49:58.000000000 -0400
*************** write_out_header (file_hdr, out_des)
*** 111,116 ****
--- 111,119 ----
if ((file_hdr->c_ino >> 16) != 0)
error (0, 0, "%s: truncating inode number", file_hdr->c_name);
+ if ((dev >> 16) != 0)
+ error (0,0, "device number %d is larger 16-bit, not support yet", dev);
+
/* Debian hack: The type of dev_t has changed in glibc. Fixed
output
to ensure that a long int is passed to sprintf. This has been
reported to "address@hidden". (1998/5/26) -BEM */
------------------------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-cpio] patch for large device number,
Wang Chen <=