Questions related to enhancing "tar"
John David Galt
Thu Jun 28 00:27:00 GMT 2001
As a long-time user of both Windows and Unix but a relative newcomer to
Cygwin, I would like to correct what I see as a deficiency in the "tar"
program. Let me describe what I want to change and why, and then ask
for the specifics I'll need to write a patch.
First off, correct me if I'm wrong, but I assume that Cygwin's version of
G++ uses the same underlying INT 21 BIOS calls for file access as Windows
does. This avoids any need for a separate partition for Unix-like files,
but it also means that they share the Windows directory structure.
The Windows directory structure does not store a "date last backed up" for
each file, but does store dates of creation, modification, and access, and
four flags called "attributes", one of which is called Archive.
The BIOS turns on the Archive attribute whenever a file is created or
opened for write access, and backup utilities written for Windows turn it
off when they back up that file. Thus, the attribute can be used to find
which files need to be saved in an "incremental backup". However, "tar"
does not recognize the Archive attribute. So I want to add an option to
"tar" that will turn off the Archive attribute for each file as it adds
that file to an archive, and a second option that will direct "tar" to
archive only those files that have the Archive attribute bit set.
What I need to know is:
a) How do I read and write the Archive attribute bit from a program
compiled in G++ under Cygwin? Is it accessible using ioctl(), and what
are the parameters? (man pages that specific don't appear to exist for
b) Does Cygwin have its own separate version of "tar"? If not, would
they be willing to host one, or a link to mine? (I'm assuming FSF would
not be interested in having me check Windows-specific code into their
John David Galt
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
More information about the Cygwin