Module Name:    src
Committed By:   pooka
Date:           Wed Oct  7 20:59:10 UTC 2009

Modified Files:
        src/usr.sbin/puffs/rump_cd9660: rump_cd9660.c
        src/usr.sbin/puffs/rump_efs: rump_efs.c
        src/usr.sbin/puffs/rump_ext2fs: rump_ext2fs.c
        src/usr.sbin/puffs/rump_ffs: rump_ffs.c
        src/usr.sbin/puffs/rump_hfs: rump_hfs.c
        src/usr.sbin/puffs/rump_lfs: rump_lfs.c
        src/usr.sbin/puffs/rump_msdos: rump_msdos.c
        src/usr.sbin/puffs/rump_ntfs: rump_ntfs.c
        src/usr.sbin/puffs/rump_sysvbfs: rump_sysvbfs.c
        src/usr.sbin/puffs/rump_udf: rump_udf.c

Log Message:
Support disklabels.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/puffs/rump_cd9660/rump_cd9660.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/puffs/rump_efs/rump_efs.c
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/puffs/rump_ext2fs/rump_ext2fs.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/puffs/rump_ffs/rump_ffs.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/puffs/rump_hfs/rump_hfs.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/puffs/rump_lfs/rump_lfs.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/puffs/rump_msdos/rump_msdos.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/puffs/rump_ntfs/rump_ntfs.c
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/puffs/rump_sysvbfs/rump_sysvbfs.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/puffs/rump_udf/rump_udf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/puffs/rump_cd9660/rump_cd9660.c
diff -u src/usr.sbin/puffs/rump_cd9660/rump_cd9660.c:1.4 src/usr.sbin/puffs/rump_cd9660/rump_cd9660.c:1.5
--- src/usr.sbin/puffs/rump_cd9660/rump_cd9660.c:1.4	Thu Sep  4 15:38:34 2008
+++ src/usr.sbin/puffs/rump_cd9660/rump_cd9660.c	Wed Oct  7 20:59:09 2009
@@ -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");

Index: src/usr.sbin/puffs/rump_efs/rump_efs.c
diff -u src/usr.sbin/puffs/rump_efs/rump_efs.c:1.3 src/usr.sbin/puffs/rump_efs/rump_efs.c:1.4
--- src/usr.sbin/puffs/rump_efs/rump_efs.c:1.3	Thu Sep  4 15:34:55 2008
+++ src/usr.sbin/puffs/rump_efs/rump_efs.c	Wed Oct  7 20:59:09 2009
@@ -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");

Index: src/usr.sbin/puffs/rump_ext2fs/rump_ext2fs.c
diff -u src/usr.sbin/puffs/rump_ext2fs/rump_ext2fs.c:1.5 src/usr.sbin/puffs/rump_ext2fs/rump_ext2fs.c:1.6
--- src/usr.sbin/puffs/rump_ext2fs/rump_ext2fs.c:1.5	Wed Oct  7 20:11:05 2009
+++ src/usr.sbin/puffs/rump_ext2fs/rump_ext2fs.c	Wed Oct  7 20:59:09 2009
@@ -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");

Index: src/usr.sbin/puffs/rump_ffs/rump_ffs.c
diff -u src/usr.sbin/puffs/rump_ffs/rump_ffs.c:1.3 src/usr.sbin/puffs/rump_ffs/rump_ffs.c:1.4
--- src/usr.sbin/puffs/rump_ffs/rump_ffs.c:1.3	Thu Sep  4 15:34:55 2008
+++ src/usr.sbin/puffs/rump_ffs/rump_ffs.c	Wed Oct  7 20:59:09 2009
@@ -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");
 

Index: src/usr.sbin/puffs/rump_hfs/rump_hfs.c
diff -u src/usr.sbin/puffs/rump_hfs/rump_hfs.c:1.3 src/usr.sbin/puffs/rump_hfs/rump_hfs.c:1.4
--- src/usr.sbin/puffs/rump_hfs/rump_hfs.c:1.3	Thu Sep  4 15:34:55 2008
+++ src/usr.sbin/puffs/rump_hfs/rump_hfs.c	Wed Oct  7 20:59:09 2009
@@ -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");

Index: src/usr.sbin/puffs/rump_lfs/rump_lfs.c
diff -u src/usr.sbin/puffs/rump_lfs/rump_lfs.c:1.6 src/usr.sbin/puffs/rump_lfs/rump_lfs.c:1.7
--- src/usr.sbin/puffs/rump_lfs/rump_lfs.c:1.6	Thu Aug  6 01:00:04 2009
+++ src/usr.sbin/puffs/rump_lfs/rump_lfs.c	Wed Oct  7 20:59:09 2009
@@ -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");

Index: src/usr.sbin/puffs/rump_msdos/rump_msdos.c
diff -u src/usr.sbin/puffs/rump_msdos/rump_msdos.c:1.4 src/usr.sbin/puffs/rump_msdos/rump_msdos.c:1.5
--- src/usr.sbin/puffs/rump_msdos/rump_msdos.c:1.4	Thu Sep  4 15:35:58 2008
+++ src/usr.sbin/puffs/rump_msdos/rump_msdos.c	Wed Oct  7 20:59:09 2009
@@ -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");

Index: src/usr.sbin/puffs/rump_ntfs/rump_ntfs.c
diff -u src/usr.sbin/puffs/rump_ntfs/rump_ntfs.c:1.3 src/usr.sbin/puffs/rump_ntfs/rump_ntfs.c:1.4
--- src/usr.sbin/puffs/rump_ntfs/rump_ntfs.c:1.3	Thu Sep  4 15:34:56 2008
+++ src/usr.sbin/puffs/rump_ntfs/rump_ntfs.c	Wed Oct  7 20:59:09 2009
@@ -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]);
 
+	UKFS_PARTITION_ARGVPROBE(part);
 	mount_ntfs_parseargs(argc, argv, &args, &mntflags,
 	    canon_dev, canon_dir);
-	rv = p2k_run_fs(MOUNT_NTFS, canon_dev, canon_dir, mntflags,
+	rv = p2k_run_diskfs(MOUNT_NTFS, canon_dev, part, canon_dir, mntflags,
 	    &args, sizeof(args), 0);
 	if (rv)
 		err(1, "mount");

Index: src/usr.sbin/puffs/rump_sysvbfs/rump_sysvbfs.c
diff -u src/usr.sbin/puffs/rump_sysvbfs/rump_sysvbfs.c:1.1 src/usr.sbin/puffs/rump_sysvbfs/rump_sysvbfs.c:1.2
--- src/usr.sbin/puffs/rump_sysvbfs/rump_sysvbfs.c:1.1	Thu Sep  4 12:21:25 2008
+++ src/usr.sbin/puffs/rump_sysvbfs/rump_sysvbfs.c	Wed Oct  7 20:59:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_sysvbfs.c,v 1.1 2008/09/04 12:21:25 pooka Exp $	*/
+/*	$NetBSD: rump_sysvbfs.c,v 1.2 2009/10/07 20:59:09 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -29,6 +29,7 @@
 #include <sys/mount.h>
 
 #include <rump/p2k.h>
+#include <rump/ukfs.h> 
 
 #include <err.h>
 #include <stdlib.h>
@@ -40,14 +41,16 @@
 main(int argc, char *argv[])
 {
 	struct sysvbfs_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_sysvbfs_parseargs(argc, argv, &args, &mntflags,
 	    canon_dev, canon_dir);
-	rv = p2k_run_fs(MOUNT_SYSVBFS, canon_dev, canon_dir, mntflags,
+	rv = p2k_run_diskfs(MOUNT_SYSVBFS, canon_dev, part, canon_dir, mntflags,
 	    &args, sizeof(args), 0);
 	if (rv)
 		err(1, "mount");

Index: src/usr.sbin/puffs/rump_udf/rump_udf.c
diff -u src/usr.sbin/puffs/rump_udf/rump_udf.c:1.3 src/usr.sbin/puffs/rump_udf/rump_udf.c:1.4
--- src/usr.sbin/puffs/rump_udf/rump_udf.c:1.3	Thu Sep  4 15:34:56 2008
+++ src/usr.sbin/puffs/rump_udf/rump_udf.c	Wed Oct  7 20:59:10 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_udf.c,v 1.3 2008/09/04 15:34:56 pooka Exp $	*/
+/*	$NetBSD: rump_udf.c,v 1.4 2009/10/07 20:59:10 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_udf.h"
 
@@ -43,14 +44,15 @@
 main(int argc, char *argv[])
 {
 	struct udf_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_udf_parseargs(argc, argv, &args, &mntflags, canon_dev, canon_dir);
-	rv = p2k_run_fs(MOUNT_UDF, canon_dev, canon_dir, mntflags, 
+	rv = p2k_run_diskfs(MOUNT_UDF, canon_dev, part, canon_dir, mntflags, 
 		&args, sizeof(args), 0);
 	if (rv)
 		err(1, "mount");

Reply via email to