Source-Changes-HG archive

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

[src/trunk]: src/sbin/gpt minor toolification: need libprop...



details:   https://anonhg.NetBSD.org/src/rev/1fb0b0868e62
branches:  trunk
changeset: 332580:1fb0b0868e62
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Sep 29 20:28:57 2014 +0000

description:
minor toolification: need libprop...

diffstat:

 sbin/gpt/add.c        |   6 +++++-
 sbin/gpt/backup.c     |   6 +++++-
 sbin/gpt/biosboot.c   |   8 ++++++--
 sbin/gpt/create.c     |   8 ++++++--
 sbin/gpt/destroy.c    |   6 +++++-
 sbin/gpt/gpt.c        |   6 +++++-
 sbin/gpt/label.c      |   6 +++++-
 sbin/gpt/map.c        |   6 +++++-
 sbin/gpt/migrate.c    |  10 +++++++++-
 sbin/gpt/recover.c    |   6 +++++-
 sbin/gpt/remove.c     |   6 +++++-
 sbin/gpt/resize.c     |   6 +++++-
 sbin/gpt/resizedisk.c |   6 +++++-
 sbin/gpt/restore.c    |   6 +++++-
 sbin/gpt/set.c        |   6 +++++-
 sbin/gpt/show.c       |  15 +++++++++++++--
 sbin/gpt/type.c       |   6 +++++-
 sbin/gpt/unset.c      |   6 +++++-
 18 files changed, 104 insertions(+), 21 deletions(-)

diffs (truncated from 445 to 300 lines):

diff -r b52812d5c8a3 -r 1fb0b0868e62 sbin/gpt/add.c
--- a/sbin/gpt/add.c    Mon Sep 29 17:54:13 2014 +0000
+++ b/sbin/gpt/add.c    Mon Sep 29 20:28:57 2014 +0000
@@ -24,12 +24,16 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <sys/cdefs.h>
 #ifdef __FBSDID
 __FBSDID("$FreeBSD: src/sbin/gpt/add.c,v 1.14 2006/06/22 22:05:28 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: add.c,v 1.24 2013/12/10 01:05:00 jnemeth Exp $");
+__RCSID("$NetBSD: add.c,v 1.25 2014/09/29 20:28:57 christos Exp $");
 #endif
 
 #include <sys/types.h>
diff -r b52812d5c8a3 -r 1fb0b0868e62 sbin/gpt/backup.c
--- a/sbin/gpt/backup.c Mon Sep 29 17:54:13 2014 +0000
+++ b/sbin/gpt/backup.c Mon Sep 29 20:28:57 2014 +0000
@@ -24,12 +24,16 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <sys/cdefs.h>
 #ifdef __FBSDID
 __FBSDID("$FreeBSD: src/sbin/gpt/show.c,v 1.14 2006/06/22 22:22:32 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: backup.c,v 1.3 2014/09/10 10:49:44 jnemeth Exp $");
+__RCSID("$NetBSD: backup.c,v 1.4 2014/09/29 20:28:57 christos Exp $");
 #endif
 
 #include <sys/bootblock.h>
diff -r b52812d5c8a3 -r 1fb0b0868e62 sbin/gpt/biosboot.c
--- a/sbin/gpt/biosboot.c       Mon Sep 29 17:54:13 2014 +0000
+++ b/sbin/gpt/biosboot.c       Mon Sep 29 20:28:57 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: biosboot.c,v 1.9 2014/09/29 05:56:43 jnemeth Exp $ */
+/*     $NetBSD: biosboot.c,v 1.10 2014/09/29 20:28:57 christos Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -31,9 +31,13 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <sys/cdefs.h>
 #ifdef __RCSID
-__RCSID("$NetBSD: biosboot.c,v 1.9 2014/09/29 05:56:43 jnemeth Exp $");
+__RCSID("$NetBSD: biosboot.c,v 1.10 2014/09/29 20:28:57 christos Exp $");
 #endif
 
 #include <sys/stat.h>
diff -r b52812d5c8a3 -r 1fb0b0868e62 sbin/gpt/create.c
--- a/sbin/gpt/create.c Mon Sep 29 17:54:13 2014 +0000
+++ b/sbin/gpt/create.c Mon Sep 29 20:28:57 2014 +0000
@@ -24,12 +24,16 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <sys/cdefs.h>
 #ifdef __FBSDID
 __FBSDID("$FreeBSD: src/sbin/gpt/create.c,v 1.11 2005/08/31 01:47:19 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: create.c,v 1.7 2013/12/04 20:15:51 jakllsch Exp $");
+__RCSID("$NetBSD: create.c,v 1.8 2014/09/29 20:28:57 christos Exp $");
 #endif
 
 #include <sys/types.h>
@@ -99,7 +103,7 @@
                        return;
                }
                mbr = gpt_read(fd, 0LL, 1);
-               bzero(mbr, sizeof(*mbr));
+               memset(mbr, 0, sizeof(*mbr));
                mbr->mbr_sig = htole16(MBR_SIG);
                mbr->mbr_part[0].part_shd = 0x00;
                mbr->mbr_part[0].part_ssect = 0x02;
diff -r b52812d5c8a3 -r 1fb0b0868e62 sbin/gpt/destroy.c
--- a/sbin/gpt/destroy.c        Mon Sep 29 17:54:13 2014 +0000
+++ b/sbin/gpt/destroy.c        Mon Sep 29 20:28:57 2014 +0000
@@ -24,12 +24,16 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <sys/cdefs.h>
 #ifdef __FBSDID
 __FBSDID("$FreeBSD: src/sbin/gpt/destroy.c,v 1.6 2005/08/31 01:47:19 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: destroy.c,v 1.4 2011/08/27 17:38:16 joerg Exp $");
+__RCSID("$NetBSD: destroy.c,v 1.5 2014/09/29 20:28:57 christos Exp $");
 #endif
 
 #include <sys/types.h>
diff -r b52812d5c8a3 -r 1fb0b0868e62 sbin/gpt/gpt.c
--- a/sbin/gpt/gpt.c    Mon Sep 29 17:54:13 2014 +0000
+++ b/sbin/gpt/gpt.c    Mon Sep 29 20:28:57 2014 +0000
@@ -26,12 +26,16 @@
  * CRC32 code derived from work by Gary S. Brown.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <sys/cdefs.h>
 #ifdef __FBSDID
 __FBSDID("$FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: gpt.c,v 1.30 2014/09/28 08:14:51 jnemeth Exp $");
+__RCSID("$NetBSD: gpt.c,v 1.31 2014/09/29 20:28:57 christos Exp $");
 #endif
 
 #include <sys/param.h>
diff -r b52812d5c8a3 -r 1fb0b0868e62 sbin/gpt/label.c
--- a/sbin/gpt/label.c  Mon Sep 29 17:54:13 2014 +0000
+++ b/sbin/gpt/label.c  Mon Sep 29 20:28:57 2014 +0000
@@ -24,12 +24,16 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <sys/cdefs.h>
 #ifdef __FBSDID
 __FBSDID("$FreeBSD: src/sbin/gpt/label.c,v 1.3 2006/10/04 18:20:25 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: label.c,v 1.15 2014/09/29 05:56:43 jnemeth Exp $");
+__RCSID("$NetBSD: label.c,v 1.16 2014/09/29 20:28:57 christos Exp $");
 #endif
 
 #include <sys/types.h>
diff -r b52812d5c8a3 -r 1fb0b0868e62 sbin/gpt/map.c
--- a/sbin/gpt/map.c    Mon Sep 29 17:54:13 2014 +0000
+++ b/sbin/gpt/map.c    Mon Sep 29 20:28:57 2014 +0000
@@ -24,12 +24,16 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <sys/cdefs.h>
 #ifdef __FBSDID
 __FBSDID("$FreeBSD: src/sbin/gpt/map.c,v 1.6 2005/08/31 01:47:19 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: map.c,v 1.6 2013/11/27 20:40:48 christos Exp $");
+__RCSID("$NetBSD: map.c,v 1.7 2014/09/29 20:28:57 christos Exp $");
 #endif
 
 #include <sys/types.h>
diff -r b52812d5c8a3 -r 1fb0b0868e62 sbin/gpt/migrate.c
--- a/sbin/gpt/migrate.c        Mon Sep 29 17:54:13 2014 +0000
+++ b/sbin/gpt/migrate.c        Mon Sep 29 20:28:57 2014 +0000
@@ -24,12 +24,16 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <sys/cdefs.h>
 #ifdef __FBSDID
 __FBSDID("$FreeBSD: src/sbin/gpt/migrate.c,v 1.16 2005/09/01 02:42:52 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: migrate.c,v 1.14 2013/12/04 20:15:51 jakllsch Exp $");
+__RCSID("$NetBSD: migrate.c,v 1.15 2014/09/29 20:28:57 christos Exp $");
 #endif
 
 #include <sys/types.h>
@@ -50,6 +54,7 @@
 /*
  * Allow compilation on platforms that do not have a BSD label.
  * The values are valid for amd64, i386 and ia64 disklabels.
+ * XXX: use disklabel_params from disklabel.c
  */
 #ifndef LABELOFFSET
 #define        LABELOFFSET     0
@@ -57,6 +62,9 @@
 #ifndef LABELSECTOR
 #define        LABELSECTOR     1
 #endif
+#ifndef RAW_PART
+#define        RAW_PART        3
+#endif
 
 /* FreeBSD filesystem types that don't match corresponding NetBSD types */
 #define        FREEBSD_FS_VINUM        14
diff -r b52812d5c8a3 -r 1fb0b0868e62 sbin/gpt/recover.c
--- a/sbin/gpt/recover.c        Mon Sep 29 17:54:13 2014 +0000
+++ b/sbin/gpt/recover.c        Mon Sep 29 20:28:57 2014 +0000
@@ -24,12 +24,16 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <sys/cdefs.h>
 #ifdef __FBSDID
 __FBSDID("$FreeBSD: src/sbin/gpt/recover.c,v 1.8 2005/08/31 01:47:19 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: recover.c,v 1.4 2011/08/27 17:38:16 joerg Exp $");
+__RCSID("$NetBSD: recover.c,v 1.5 2014/09/29 20:28:57 christos Exp $");
 #endif
 
 #include <sys/types.h>
diff -r b52812d5c8a3 -r 1fb0b0868e62 sbin/gpt/remove.c
--- a/sbin/gpt/remove.c Mon Sep 29 17:54:13 2014 +0000
+++ b/sbin/gpt/remove.c Mon Sep 29 20:28:57 2014 +0000
@@ -24,12 +24,16 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <sys/cdefs.h>
 #ifdef __FBSDID
 __FBSDID("$FreeBSD: src/sbin/gpt/remove.c,v 1.10 2006/10/04 18:20:25 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: remove.c,v 1.13 2014/09/29 05:56:43 jnemeth Exp $");
+__RCSID("$NetBSD: remove.c,v 1.14 2014/09/29 20:28:57 christos Exp $");
 #endif
 
 #include <sys/types.h>
diff -r b52812d5c8a3 -r 1fb0b0868e62 sbin/gpt/resize.c
--- a/sbin/gpt/resize.c Mon Sep 29 17:54:13 2014 +0000
+++ b/sbin/gpt/resize.c Mon Sep 29 20:28:57 2014 +0000
@@ -24,12 +24,16 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <sys/cdefs.h>
 #ifdef __FBSDID
 __FBSDID("$FreeBSD: src/sbin/gpt/add.c,v 1.14 2006/06/22 22:05:28 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: resize.c,v 1.8 2013/12/10 01:05:00 jnemeth Exp $");
+__RCSID("$NetBSD: resize.c,v 1.9 2014/09/29 20:28:57 christos Exp $");
 #endif
 
 #include <sys/types.h>
diff -r b52812d5c8a3 -r 1fb0b0868e62 sbin/gpt/resizedisk.c
--- a/sbin/gpt/resizedisk.c     Mon Sep 29 17:54:13 2014 +0000
+++ b/sbin/gpt/resizedisk.c     Mon Sep 29 20:28:57 2014 +0000
@@ -24,12 +24,16 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <sys/cdefs.h>
 #ifdef __FBSDID
 __FBSDID("$FreeBSD: src/sbin/gpt/add.c,v 1.14 2006/06/22 22:05:28 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: resizedisk.c,v 1.2 2014/09/23 13:48:04 msaitoh Exp $");
+__RCSID("$NetBSD: resizedisk.c,v 1.3 2014/09/29 20:28:57 christos Exp $");



Home | Main Index | Thread Index | Old Index