Source-Changes-HG archive

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

[src/trunk]: src/external/cddl/osnet/dist/lib/libzfs/common Disable *at funct...



details:   https://anonhg.NetBSD.org/src/rev/af9fb1d348ca
branches:  trunk
changeset: 747913:af9fb1d348ca
user:      haad <haad%NetBSD.org@localhost>
date:      Mon Oct 05 16:25:27 2009 +0000

description:
Disable *at functions for now. These functions should be implemented
because they are part of POSIX standard but it seems to be a long time process.

XXX. This commit should be reverted after adding support for openat and fstatat.

diffstat:

 external/cddl/osnet/dist/lib/libzfs/common/libzfs_pool.c |  15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diffs (50 lines):

diff -r d1b926855f3d -r af9fb1d348ca external/cddl/osnet/dist/lib/libzfs/common/libzfs_pool.c
--- a/external/cddl/osnet/dist/lib/libzfs/common/libzfs_pool.c  Mon Oct 05 14:52:36 2009 +0000
+++ b/external/cddl/osnet/dist/lib/libzfs/common/libzfs_pool.c  Mon Oct 05 16:25:27 2009 +0000
@@ -2092,20 +2092,23 @@
        libzfs_handle_t *hdl = zhp->zpool_hdl;
        char (*paths)[MAXPATHLEN];
        size_t size = 4;
-       int curr, fd, base, ret = 0;
+       int curr, base, ret = 0;
+#ifdef PORT_NETBSD
+       int fd;
        DIR *dirp;
        struct dirent *dp;
+#endif 
        struct stat st;
 
        if ((base = open("/dev/zvol/dsk", O_RDONLY)) < 0)
                return (errno == ENOENT ? 0 : -1);
-
+#ifdef PORT_NETBSD
        if (fstatat(base, zhp->zpool_name, &st, 0) != 0) {
                int err = errno;
                (void) close(base);
                return (err == ENOENT ? 0 : -1);
        }
-
+#endif
        /*
         * Oddly this wasn't a directory -- ignore that failure since we
         * know there are no links lower in the (non-existant) hierarchy.
@@ -2122,7 +2125,8 @@
 
        (void) strlcpy(paths[0], zhp->zpool_name, sizeof (paths[0]));
        curr = 0;
-
+       
+#ifdef PORT_NETBSD     
        while (curr >= 0) {
                if (fstatat(base, paths[curr], &st, AT_SYMLINK_NOFOLLOW) != 0)
                        goto err;
@@ -2171,7 +2175,8 @@
 
                curr--;
        }
-
+#endif /* PORT_NETBSD */
+       
        free(paths);
        (void) close(base);
 



Home | Main Index | Thread Index | Old Index