bug-tar
[Top][All Lists]
Advanced

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

[Bug-tar] gnu tar: patch/featureadd


From: Andrew Somerville
Subject: [Bug-tar] gnu tar: patch/featureadd
Date: Tue, 29 Jul 2003 08:26:09 -0400

Hello,

        I have added a feature to tar for my own purpose, and I want to offer it back. I would need to know proceedures for doing so: i.e. diff patch, patch comments, code comments, style requirements. Its a small patch, but I want to make sure its according to what ever rules you have in place. (I currently have diffs against 1.13.25 and 1.13 )

        The feature is a command line switch which allows tar to treat block devices with their contents, instead of the current behavior which does not include the contents of the block device. Im not sure if it would be a usefull feature to anyone else, but what I used it for is creating images of sparse file systems. I also modified a GPL program called sfill such that it zeros out all unused sectors of a filesystem. Once the filesystem's sectors are zeroed, it is a candidate to be stored as a sparse file. The problem comes when you wish to copy that sparse file to disk for storege. When attempting to copy to CD, it seems that iso9660 cannot handel sparse files, and so it must be stored in a different format. An example of use of the new patch would be:

  mount /dev/hdb1 /mnt/hdb1
  zfill /mnt/hdb1
  umount /mnt/hdb1
  mount /dev/hdb2 /mnt/hdb2
  zfill /mnt/hdb2
  umount /dev/hdb2
  tar -DSPc /dev/hdb[1-2] | cdrecord -dev=0,0,0
  (Where D is the new command line switch, with a long option of --block-contents)

The disk would contain a tar file which when extracted could restore the devices to their original state.

Let me know if you think this feature is worth adding, and if so the proceedure for doing so.

        Regards,
        Andrew Somerville


reply via email to

[Prev in Thread] Current Thread [Next in Thread]