From 2e201492a91eb791fb7a38ae48e722c66d654087 Mon Sep 17 00:00:00 2001 From: dillo Date: Thu, 22 Mar 2007 13:31:05 +0000 Subject: [PATCH] Remove offset argument, no longer needed. --- sbin/mount_hfs/mount_hfs.8 | 9 ++------- sbin/mount_hfs/mount_hfs.c | 17 ++++------------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/sbin/mount_hfs/mount_hfs.8 b/sbin/mount_hfs/mount_hfs.8 index 581ccf5a8b36..d8afb0f7b1dd 100644 --- a/sbin/mount_hfs/mount_hfs.8 +++ b/sbin/mount_hfs/mount_hfs.8 @@ -1,4 +1,4 @@ -.\" $NetBSD: mount_hfs.8,v 1.2 2007/03/06 11:28:47 dillo Exp $ +.\" $NetBSD: mount_hfs.8,v 1.3 2007/03/22 13:31:05 dillo Exp $ .\" .\" Copyright (c) 2004, 2007 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -98,12 +98,7 @@ Options are specified with a flag followed by a comma separated string of options. See the .Xr mount 8 -man page, following HFS+-specific options are supported: -.Bl -tag -width indent -.It Cm offset -Specify the offset of the file system, in 512 byte blocks, from the -beginning of the partition. -.El +man page for possible options and their meanings. .El .Sh NOTES Apple disk images diff --git a/sbin/mount_hfs/mount_hfs.c b/sbin/mount_hfs/mount_hfs.c index e7babcb3df72..c16205005689 100644 --- a/sbin/mount_hfs/mount_hfs.c +++ b/sbin/mount_hfs/mount_hfs.c @@ -1,4 +1,4 @@ -/* $NetBSD: mount_hfs.c,v 1.2 2007/03/06 11:28:47 dillo Exp $ */ +/* $NetBSD: mount_hfs.c,v 1.3 2007/03/22 13:31:05 dillo Exp $ */ /*- * Copyright (c) 2005, 2007 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ __COPYRIGHT("@(#) Copyright (c) 2005 Yevgeny Binder\n\ #endif /* not lint */ #ifndef lint -__RCSID("$NetBSD: mount_hfs.c,v 1.2 2007/03/06 11:28:47 dillo Exp $"); +__RCSID("$NetBSD: mount_hfs.c,v 1.3 2007/03/22 13:31:05 dillo Exp $"); #endif /* not lint */ #include @@ -84,7 +84,6 @@ __RCSID("$NetBSD: mount_hfs.c,v 1.2 2007/03/06 11:28:47 dillo Exp $"); static const struct mntopt mopts[] = { MOPT_STDOPTS, MOPT_GETARGS, - { "offset", 0, __MNT_UNUSED3, 0 }, MOPT_NULL, }; @@ -113,7 +112,6 @@ mount_hfs(argc, argv) char *fs_name; args.fspec = NULL; - args.offset = 0; mntflags = 0; optind = optreset = 1; /* Reset for parse of new argv. */ @@ -121,15 +119,8 @@ mount_hfs(argc, argv) switch (ch) { case 'o': optparse = getmntopts(optarg, mopts, &mntflags, 0); - - /* - * 'offset' is passed in as the number of 512-byte blocks from the - * start of the device to the start of the volume. args.offset - * expects this as the number of bytes, so multiply by 512. - */ - if(mntflags & __MNT_UNUSED3) - args.offset = 512 * (uint64_t)getmntoptnum(optparse, "offset"); - + if (optparse == NULL) + err(1, "getmntopts"); freemntopts(optparse); break; case '?':