]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Cleanup some leftover turds from the days when volume managers new about XFS subvolum...
authorNathan Scott <nathans@sgi.com>
Tue, 8 Aug 2006 15:33:39 +0000 (15:33 +0000)
committerNathan Scott <nathans@sgi.com>
Tue, 8 Aug 2006 15:33:39 +0000 (15:33 +0000)
Merge of master-melb:xfs-cmds:26730a by kenmcd.

copy/xfs_copy.c
db/init.c
growfs/xfs_growfs.c
include/libxfs.h
libxfs/init.c
logprint/logprint.c
mkfs/xfs_mkfs.c
repair/init.c

index 6af8c0ec0aa447b7ee903c08df8c45cdbb65dc1c..adeb60a91b705e53e8a1b31c5e542d4b63135242 100644 (file)
@@ -651,10 +651,8 @@ main(int argc, char **argv)
        /* prepare the libxfs_init structure */
 
        memset(&xargs, 0, sizeof(xargs));
-       xargs.notvolmsg = "oh no %s";
        xargs.isdirect = LIBXFS_DIRECT;
        xargs.isreadonly = LIBXFS_ISREADONLY;
-       xargs.notvolok = 1;
 
        if (source_is_file)  {
                xargs.dname = source_name;
index f2d60a9ed2da878d4850fefa6f9f055bdfdd4b88..8901fc74b7a0061e0b9fd8f4a3604a71cb7da62c 100644 (file)
--- a/db/init.c
+++ b/db/init.c
@@ -99,7 +99,6 @@ init(
                x.volname = fsdevice;
        else
                x.dname = fsdevice;
-       x.notvolok = 1;
 
        if (!libxfs_init(&x)) {
                fputs(_("\nfatal error -- couldn't initialize XFS library\n"),
index ace64cbd98ad6ef6b51b3797f2d2b983a7c9615d..5e7479f75dfbfb8b38905cf3d1635c729e80d910 100644 (file)
@@ -254,7 +254,6 @@ main(int argc, char **argv)
        xi.dname = datadev;
        xi.logname = logdev;
        xi.rtname = rtdev;
-       xi.notvolok = 1;
        xi.isreadonly = LIBXFS_ISREADONLY;
 
        if (!libxfs_init(&xi))
index 6ad5925eb82d11043a57f7fa03cd7500a8494f96..fa7cb9d6cd30b50b88f075d26967bd847d5189be 100644 (file)
@@ -73,8 +73,6 @@ typedef struct {
        int             lisfile;        /* log "subvolume" is a regular file */
        int             lcreat;         /* try to create log subvolume */
        int             risfile;        /* realtime "subvolume" is a reg file */        int             rcreat;         /* try to create realtime subvolume */
-       char            *notvolmsg;     /* format string for not XLV message */
-       int             notvolok;       /* set if not XLV => try data */
        int             setblksize;     /* attempt to set device blksize */
                                /* output results */
        dev_t           ddev;           /* device for data subvolume */
index e5d4b985002aefd75bce252a14d598bc73f6310e..21d040abad4f651bf0dcd14f531edeb469e1873e 100644 (file)
@@ -245,80 +245,9 @@ libxfs_init(libxfs_init_t *a)
                        goto done;
                needcd = 1;
                fd = open(rawfile, O_RDONLY);
-#ifdef HAVE_VOLUME_MANAGER
-               xlv_getdev_t getdev;
-               if (ioctl(fd, DIOCGETVOLDEV, &getdev) < 0)
-#else
-               if (1)
-#endif
-               {
-                       if (a->notvolok) {
-                               dname = a->dname = a->volname;
-                               a->volname = NULL;
-                               goto voldone;
-                       }
-                       fprintf(stderr, _("%s: "
-                               "%s is not a volume device name\n"),
-                               progname, a->volname);
-                       if (a->notvolmsg)
-                               fprintf(stderr, a->notvolmsg, a->volname);
-                       goto done;
-               }
-#ifdef HAVE_VOLUME_MANAGER
-               if (getdev.data_subvol_dev && dname) {
-                       fprintf(stderr, _("%s: "
-                               "%s has a data subvolume, cannot specify %s\n"),
-                               progname, a->volname, dname);
-                       goto done;
-               }
-               if (getdev.log_subvol_dev && logname) {
-                       fprintf(stderr, _("%s: "
-                               "%s has a log subvolume, cannot specify %s\n"),
-                               progname, a->volname, logname);
-                       goto done;
-               }
-               if (getdev.rt_subvol_dev && rtname) {
-                       fprintf(stderr, _("%s: %s has a realtime subvolume, "
-                               "cannot specify %s\n"),
-                               progname, a->volname, rtname);
-                       goto done;
-               }
-               if (!dname && getdev.data_subvol_dev) {
-                       strcpy(dpath, "/tmp/libxfsdXXXXXX");
-                       (void)mktemp(dpath);
-                       if (mknod(dpath, S_IFCHR | 0600,
-                                 getdev.data_subvol_dev) < 0) {
-                               fprintf(stderr, _("%s: mknod failed: %s\n"),
-                                       progname, strerror(errno));
-                               goto done;
-                       }
-                       dname = dpath;
-               }
-               if (!logname && getdev.log_subvol_dev) {
-                       strcpy(logpath, "/tmp/libxfslXXXXXX");
-                       (void)mktemp(logpath);
-                       if (mknod(logpath, S_IFCHR | 0600,
-                                 getdev.log_subvol_dev) < 0) {
-                               fprintf(stderr, _("%s: mknod failed: %s\n"),
-                                       progname, strerror(errno));
-                               goto done;
-                       }
-                       logname = logpath;
-               }
-               if (!rtname && getdev.rt_subvol_dev) {
-                       strcpy(rtpath, "/tmp/libxfsrXXXXXX");
-                       (void)mktemp(rtpath);
-                       if (mknod(rtpath, S_IFCHR | 0600,
-                                 getdev.rt_subvol_dev) < 0) {
-                               fprintf(stderr, _("%s: mknod failed: %s\n"),
-                                       progname, strerror(errno));
-                               goto done;
-                       }
-                       rtname = rtpath;
-               }
-#endif
+               dname = a->dname = a->volname;
+               a->volname = NULL;
        }
-voldone:
        if (dname) {
                if (dname[0] != '/' && needcd)
                        chdir(curdir);
index a9ddb3fd48733d8215cd6ad46519c7f2ee4a2c03..29de24136060575630c2d6566a17388a82ce1c53 100644 (file)
@@ -204,10 +204,7 @@ main(int argc, char **argv)
        if (x.dname == NULL)
                usage();
 
-       x.notvolok = 1;
        x.isreadonly = LIBXFS_ISINACTIVE;
-       x.notvolmsg = "You should never see this message.\n";
-
        printf("xfs_logprint:\n");
        if (!libxfs_init(&x))
                exit(1);
index 51997fc33a992664605cfa76d3a32714b8a2e34e..0042c344c6e7981a949c9c48cd2c54b6761fd2a4 100644 (file)
@@ -634,7 +634,6 @@ main(
        bzero(&fsx, sizeof(fsx));
 
        bzero(&xi, sizeof(xi));
-       xi.notvolok = 1;
        xi.setblksize = 1;
        xi.isdirect = LIBXFS_DIRECT;
        xi.isreadonly = LIBXFS_EXCLUSIVELY;
index 75f1f746ad49081ff0884ed9552c120555ca142f..090ebea398179e2985e7ced0899995ee0ea8798f 100644 (file)
@@ -126,10 +126,7 @@ xfs_init(libxfs_init_t *args)
                /* XXX assume data file also means rt file */
        }
 
-       args->notvolmsg = _("you should never get this message - %s");
-       args->notvolok = 1;
        args->setblksize = !dangerously;
-
        args->isdirect = LIBXFS_DIRECT;
        if (no_modify)
                args->isreadonly = (LIBXFS_ISREADONLY | LIBXFS_ISINACTIVE);