Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/puffs Support disklabels.



details:   https://anonhg.NetBSD.org/src/rev/144d022a1d8d
branches:  trunk
changeset: 747984:144d022a1d8d
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Oct 07 20:59:09 2009 +0000

description:
Support disklabels.

diffstat:

 usr.sbin/puffs/rump_cd9660/rump_cd9660.c   |  11 +++++++----
 usr.sbin/puffs/rump_efs/rump_efs.c         |  10 ++++++----
 usr.sbin/puffs/rump_ext2fs/rump_ext2fs.c   |  11 +++++++----
 usr.sbin/puffs/rump_ffs/rump_ffs.c         |  12 +++++++-----
 usr.sbin/puffs/rump_hfs/rump_hfs.c         |  10 ++++++----
 usr.sbin/puffs/rump_lfs/rump_lfs.c         |  15 ++++++++++-----
 usr.sbin/puffs/rump_msdos/rump_msdos.c     |  10 ++++++----
 usr.sbin/puffs/rump_ntfs/rump_ntfs.c       |  10 ++++++----
 usr.sbin/puffs/rump_sysvbfs/rump_sysvbfs.c |  11 +++++++----
 usr.sbin/puffs/rump_udf/rump_udf.c         |  10 ++++++----
 10 files changed, 68 insertions(+), 42 deletions(-)

diffs (truncated from 382 to 300 lines):

diff -r 9c48af85ac24 -r 144d022a1d8d usr.sbin/puffs/rump_cd9660/rump_cd9660.c
--- a/usr.sbin/puffs/rump_cd9660/rump_cd9660.c  Wed Oct 07 20:56:29 2009 +0000
+++ b/usr.sbin/puffs/rump_cd9660/rump_cd9660.c  Wed Oct 07 20:59:09 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump_cd9660.c,v 1.4 2008/09/04 15:38:34 pooka Exp $    */
+/*     $NetBSD: rump_cd9660.c,v 1.5 2009/10/07 20:59:09 pooka Exp $    */
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -31,6 +31,7 @@
 #include <isofs/cd9660/cd9660_mount.h>
 
 #include <rump/p2k.h>
+#include <rump/ukfs.h> 
 
 #include <err.h>
 #include <stdlib.h>
@@ -42,14 +43,16 @@
 main(int argc, char *argv[])
 {
        struct iso_args args;
-       char canon_dev[MAXPATHLEN], canon_dir[MAXPATHLEN];
-       int rv, mntflags;
+       char canon_dev[UKFS_PARTITION_MAXPATHLEN], canon_dir[MAXPATHLEN];
+       int mntflags, part;
+       int rv;
 
        setprogname(argv[0]);
 
+       UKFS_PARTITION_ARGVPROBE(part);
        mount_cd9660_parseargs(argc, argv, &args, &mntflags,
            canon_dev, canon_dir);
-       rv = p2k_run_fs(MOUNT_CD9660, canon_dev, canon_dir, mntflags,
+       rv = p2k_run_diskfs(MOUNT_CD9660, canon_dev, part, canon_dir, mntflags,
            &args, sizeof(args), 0);
        if (rv)
                err(1, "mount");
diff -r 9c48af85ac24 -r 144d022a1d8d usr.sbin/puffs/rump_efs/rump_efs.c
--- a/usr.sbin/puffs/rump_efs/rump_efs.c        Wed Oct 07 20:56:29 2009 +0000
+++ b/usr.sbin/puffs/rump_efs/rump_efs.c        Wed Oct 07 20:59:09 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump_efs.c,v 1.3 2008/09/04 15:34:55 pooka Exp $       */
+/*     $NetBSD: rump_efs.c,v 1.4 2009/10/07 20:59:09 pooka Exp $       */
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -36,6 +36,7 @@
 #include <unistd.h>
 
 #include <rump/p2k.h>
+#include <rump/ukfs.h> 
 
 #include "mount_efs.h"
 
@@ -43,14 +44,15 @@
 main(int argc, char *argv[])
 {
        struct efs_args args;
-       char canon_dev[MAXPATHLEN], canon_dir[MAXPATHLEN];
-       int mntflags;
+       char canon_dev[UKFS_PARTITION_MAXPATHLEN], canon_dir[MAXPATHLEN];
+       int mntflags, part;
        int rv;
 
        setprogname(argv[0]);
 
+       UKFS_PARTITION_ARGVPROBE(part);
        mount_efs_parseargs(argc, argv, &args, &mntflags, canon_dev, canon_dir);
-       rv = p2k_run_fs(MOUNT_EFS, canon_dev, canon_dir, mntflags, 
+       rv = p2k_run_diskfs(MOUNT_EFS, canon_dev, part, canon_dir, mntflags, 
                &args, sizeof(args), 0);
        if (rv)
                err(1, "mount");
diff -r 9c48af85ac24 -r 144d022a1d8d usr.sbin/puffs/rump_ext2fs/rump_ext2fs.c
--- a/usr.sbin/puffs/rump_ext2fs/rump_ext2fs.c  Wed Oct 07 20:56:29 2009 +0000
+++ b/usr.sbin/puffs/rump_ext2fs/rump_ext2fs.c  Wed Oct 07 20:59:09 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump_ext2fs.c,v 1.5 2009/10/07 20:11:05 pooka Exp $    */
+/*     $NetBSD: rump_ext2fs.c,v 1.6 2009/10/07 20:59:09 pooka Exp $    */
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -36,6 +36,7 @@
 #include <unistd.h>
 
 #include <rump/p2k.h>
+#include <rump/ukfs.h> 
 
 #include "mount_ext2fs.h"
 
@@ -43,14 +44,16 @@
 main(int argc, char *argv[])
 {
        struct ufs_args args;
-       char canon_dev[MAXPATHLEN], canon_dir[MAXPATHLEN];
-       int mntflags;
+       char canon_dev[UKFS_PARTITION_MAXPATHLEN], canon_dir[MAXPATHLEN];
+       int mntflags, part;
        int rv;
 
        setprogname(argv[0]);
+
+       UKFS_PARTITION_ARGVPROBE(part);
        mount_ext2fs_parseargs(argc, argv, &args, &mntflags,
            canon_dev, canon_dir);
-       rv = p2k_run_fs(MOUNT_EXT2FS, canon_dev, canon_dir, mntflags, 
+       rv = p2k_run_diskfs(MOUNT_EXT2FS, canon_dev, part, canon_dir, mntflags, 
                &args, sizeof(args), 0);
        if (rv)
                err(1, "mount");
diff -r 9c48af85ac24 -r 144d022a1d8d usr.sbin/puffs/rump_ffs/rump_ffs.c
--- a/usr.sbin/puffs/rump_ffs/rump_ffs.c        Wed Oct 07 20:56:29 2009 +0000
+++ b/usr.sbin/puffs/rump_ffs/rump_ffs.c        Wed Oct 07 20:59:09 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump_ffs.c,v 1.3 2008/09/04 15:34:55 pooka Exp $       */
+/*     $NetBSD: rump_ffs.c,v 1.4 2009/10/07 20:59:09 pooka Exp $       */
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -36,6 +36,7 @@
 #include <unistd.h>
 
 #include <rump/p2k.h>
+#include <rump/ukfs.h>
 
 #include "mount_ffs.h"
 
@@ -43,15 +44,16 @@
 main(int argc, char *argv[])
 {
        struct ufs_args args;
-       char canon_dev[MAXPATHLEN], canon_dir[MAXPATHLEN];
-       int mntflags;
+       char canon_dev[UKFS_PARTITION_MAXPATHLEN], canon_dir[MAXPATHLEN];
+       int mntflags, part;
        int rv;
 
        setprogname(argv[0]);
 
+       UKFS_PARTITION_ARGVPROBE(part);
        mount_ffs_parseargs(argc, argv, &args, &mntflags, canon_dev, canon_dir);
-       rv = p2k_run_fs(MOUNT_FFS, canon_dev, canon_dir, mntflags,
-           &args, sizeof(args), 0);
+       rv = p2k_run_diskfs(MOUNT_FFS, canon_dev, part, canon_dir,
+           mntflags, &args, sizeof(args), 0);
        if (rv)
                err(1, "mount");
 
diff -r 9c48af85ac24 -r 144d022a1d8d usr.sbin/puffs/rump_hfs/rump_hfs.c
--- a/usr.sbin/puffs/rump_hfs/rump_hfs.c        Wed Oct 07 20:56:29 2009 +0000
+++ b/usr.sbin/puffs/rump_hfs/rump_hfs.c        Wed Oct 07 20:59:09 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump_hfs.c,v 1.3 2008/09/04 15:34:55 pooka Exp $       */
+/*     $NetBSD: rump_hfs.c,v 1.4 2009/10/07 20:59:09 pooka Exp $       */
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -36,6 +36,7 @@
 #include <unistd.h>
 
 #include <rump/p2k.h>
+#include <rump/ukfs.h> 
 
 #include "mount_hfs.h"
 
@@ -43,14 +44,15 @@
 main(int argc, char *argv[])
 {
        struct hfs_args args;
-       char canon_dev[MAXPATHLEN], canon_dir[MAXPATHLEN];
-       int mntflags;
+       char canon_dev[UKFS_PARTITION_MAXPATHLEN], canon_dir[MAXPATHLEN];
+       int mntflags, part;
        int rv;
 
        setprogname(argv[0]);
 
+       UKFS_PARTITION_ARGVPROBE(part);
        mount_hfs_parseargs(argc, argv, &args, &mntflags, canon_dev, canon_dir);
-       rv = p2k_run_fs(MOUNT_HFS, canon_dev, canon_dir, mntflags, 
+       rv = p2k_run_diskfs(MOUNT_HFS, canon_dev, part, canon_dir, mntflags, 
                &args, sizeof(args), 0);
        if (rv)
                err(1, "mount");
diff -r 9c48af85ac24 -r 144d022a1d8d usr.sbin/puffs/rump_lfs/rump_lfs.c
--- a/usr.sbin/puffs/rump_lfs/rump_lfs.c        Wed Oct 07 20:56:29 2009 +0000
+++ b/usr.sbin/puffs/rump_lfs/rump_lfs.c        Wed Oct 07 20:59:09 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump_lfs.c,v 1.6 2009/08/06 01:00:04 pooka Exp $       */
+/*     $NetBSD: rump_lfs.c,v 1.7 2009/10/07 20:59:09 pooka Exp $       */
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -51,7 +51,7 @@
        the_argv[1] = "-D"; /* don't fork() & detach */
        the_argv[2] = arg;
 
-       sleep(1); /* XXXtehsuck: wait until mount is complete is other thread */
+       sleep(1); /* XXXtehsuck: wait until mount is complete in other thread */
        lfs_cleaner_main(3, __UNCONST(the_argv));
 
        return NULL;
@@ -61,9 +61,10 @@
 main(int argc, char *argv[])
 {
        struct ufs_args args;
-       char canon_dev[MAXPATHLEN], canon_dir[MAXPATHLEN], rawdev[MAXPATHLEN];
+       char canon_dev[UKFS_PARTITION_MAXPATHLEN], canon_dir[MAXPATHLEN];
+       char rawdev[MAXPATHLEN];
        pthread_t cleanerthread;
-       int mntflags;
+       int mntflags, part;
        int rv;
 
        setprogname(argv[0]);
@@ -78,6 +79,10 @@
        if (ukfs_modload("librumpfs_lfs.so") != 1)
                err(1, "modload lfs");
 
+       UKFS_PARTITION_ARGVPROBE(part);
+       if (part != UKFS_PARTITION_NONE) {
+               errx(1, "lfs does not currently support embedded partitions");
+       }
        mount_lfs_parseargs(argc, argv, &args, &mntflags, canon_dev, canon_dir);
 
        /*
@@ -107,7 +112,7 @@
        cleaner(canon_dir);
 #endif
 
-       rv = p2k_run_fs(MOUNT_LFS, canon_dev, canon_dir, mntflags,
+       rv = p2k_run_diskfs(MOUNT_LFS, canon_dev, part, canon_dir, mntflags,
            &args, sizeof(args), 0);
        if (rv)
                err(1, "mount");
diff -r 9c48af85ac24 -r 144d022a1d8d usr.sbin/puffs/rump_msdos/rump_msdos.c
--- a/usr.sbin/puffs/rump_msdos/rump_msdos.c    Wed Oct 07 20:56:29 2009 +0000
+++ b/usr.sbin/puffs/rump_msdos/rump_msdos.c    Wed Oct 07 20:59:09 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump_msdos.c,v 1.4 2008/09/04 15:35:58 pooka Exp $     */
+/*     $NetBSD: rump_msdos.c,v 1.5 2009/10/07 20:59:09 pooka Exp $     */
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -36,6 +36,7 @@
 #include <unistd.h>
 
 #include <rump/p2k.h>
+#include <rump/ukfs.h> 
 
 #include "mount_msdos.h"
 
@@ -43,15 +44,16 @@
 main(int argc, char *argv[])
 {
        struct msdosfs_args args;
-       char canon_dev[MAXPATHLEN], canon_dir[MAXPATHLEN];
-       int mntflags;
+       char canon_dev[UKFS_PARTITION_MAXPATHLEN], canon_dir[MAXPATHLEN];
+       int mntflags, part;
        int rv;
 
        setprogname(argv[0]);
 
+       UKFS_PARTITION_ARGVPROBE(part);
        mount_msdos_parseargs(argc, argv, &args, &mntflags,
            canon_dev, canon_dir);
-       rv = p2k_run_fs(MOUNT_MSDOS, canon_dev, canon_dir, mntflags, 
+       rv = p2k_run_diskfs(MOUNT_MSDOS, canon_dev, part, canon_dir, mntflags, 
                &args, sizeof(args), 0);
        if (rv)
                err(1, "mount");
diff -r 9c48af85ac24 -r 144d022a1d8d usr.sbin/puffs/rump_ntfs/rump_ntfs.c
--- a/usr.sbin/puffs/rump_ntfs/rump_ntfs.c      Wed Oct 07 20:56:29 2009 +0000
+++ b/usr.sbin/puffs/rump_ntfs/rump_ntfs.c      Wed Oct 07 20:59:09 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump_ntfs.c,v 1.3 2008/09/04 15:34:56 pooka Exp $      */
+/*     $NetBSD: rump_ntfs.c,v 1.4 2009/10/07 20:59:09 pooka Exp $      */
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -36,6 +36,7 @@
 #include <unistd.h>
 
 #include <rump/p2k.h>
+#include <rump/ukfs.h> 
 
 #include "mount_ntfs.h"
 
@@ -43,15 +44,16 @@
 main(int argc, char *argv[])
 {
        struct ntfs_args args;
-       char canon_dev[MAXPATHLEN], canon_dir[MAXPATHLEN];
-       int mntflags;
+       char canon_dev[UKFS_PARTITION_MAXPATHLEN], canon_dir[MAXPATHLEN];
+       int mntflags, part;
        int rv;
 
        setprogname(argv[0]);



Home | Main Index | Thread Index | Old Index