Dave Kleikamp wrote:
[...] through the jfs_debugfs utility.  The timestamp is set when the
file is created, but never modified after that.
He just submitted it to the jfs-discussion mailing list this morning, so
it needs a little bit of review, but I think it will probably make the
2.6.17 kernel.

        Is there a straightforward way to detect this
        at both compile- and run-time?

        At **worst** one could try to dlsym a
        pointer to the interface the first time
        someone tries to use it and return
        errno=ENOTSUP to that and
        all subsequent calls if it's not there.

        int sys_set_create_time(int fd) {
                static enum exists (UNTESTED=-1,
                        PRESENT=1, ABSENT=0} = UNTESTED;

                if (exists == UNTESTED) {
                        if (dlsym(RTLD_NEXT,set_create_time) == NULL) {
                                exists = ABSENT;
                                errno = ENOTSUP;
                                return -1;
                        }
                        else {
                                exists = PRESENT
                        }
                }
                switch (exists) {
                case ABSENT;
                        errno = ENOTSUP;
                        return -1;
                case PRESENT:
                        return set_create_time(fd);
                }
        }
--dave
--
David Collier-Brown,      | Always do right. This will gratify
Sun Microsystems, Toronto | some people and astonish the rest
[EMAIL PROTECTED]     |                      -- Mark Twain
(416) 263-5733 (x65733)   |


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Jfs-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jfs-discussion

Reply via email to