summaryrefslogtreecommitdiff
path: root/sbin/pdisk
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2016-01-18 00:04:37 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2016-01-18 00:04:37 +0000
commit8d008094dddfee2b86239c4466fb332eda3e5452 (patch)
treed63150cb2ba8da2669ddca2da2625092d32df64f /sbin/pdisk
parent01308218db84dbe39d40e0a68e9051070079e552 (diff)
Remove a grab bag of unused #define's, fields, enum's, variables,
functions.
Diffstat (limited to 'sbin/pdisk')
-rw-r--r--sbin/pdisk/file_media.c18
-rw-r--r--sbin/pdisk/partition_map.c3
-rw-r--r--sbin/pdisk/partition_map.h11
-rw-r--r--sbin/pdisk/pdisk.c12
4 files changed, 4 insertions, 40 deletions
diff --git a/sbin/pdisk/file_media.c b/sbin/pdisk/file_media.c
index 610faf1246c..3e273e28e9c 100644
--- a/sbin/pdisk/file_media.c
+++ b/sbin/pdisk/file_media.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file_media.c,v 1.30 2016/01/17 23:18:19 krw Exp $ */
+/* $OpenBSD: file_media.c,v 1.31 2016/01/18 00:04:36 krw Exp $ */
/*
* file_media.c -
@@ -45,22 +45,10 @@
#include "file_media.h"
-static long file_inited = 0;
-
void compute_block_size(int, char *);
void file_init(void);
void
-file_init(void)
-{
- if (file_inited != 0) {
- return;
- }
- file_inited = 1;
-}
-
-
-void
compute_block_size(int fd, char *name)
{
struct disklabel dl;
@@ -86,10 +74,6 @@ open_file_as_media(char *file, int oflag)
off_t off;
struct stat info;
- if (file_inited == 0) {
- file_init();
- }
-
a = 0;
fd = opendev(file, oflag, OPENDEV_PART, NULL);
if (fd >= 0) {
diff --git a/sbin/pdisk/partition_map.c b/sbin/pdisk/partition_map.c
index 75fa944ad3e..d661ec0d3aa 100644
--- a/sbin/pdisk/partition_map.c
+++ b/sbin/pdisk/partition_map.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: partition_map.c,v 1.36 2016/01/17 23:18:19 krw Exp $ */
+/* $OpenBSD: partition_map.c,v 1.37 2016/01/18 00:04:36 krw Exp $ */
/*
* partition_map.c - partition map routines
@@ -734,7 +734,6 @@ delete_partition_from_map(struct partition_map *entry)
remove_driver(entry); /* update block0 if necessary */
}
free(entry->data);
- entry->HFS_kind = kHFS_not;
entry->data = data;
combine_entry(entry);
map = entry->the_map;
diff --git a/sbin/pdisk/partition_map.h b/sbin/pdisk/partition_map.h
index 4207811beac..5706d0bd4fd 100644
--- a/sbin/pdisk/partition_map.h
+++ b/sbin/pdisk/partition_map.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: partition_map.h,v 1.17 2016/01/17 23:18:19 krw Exp $ */
+/* $OpenBSD: partition_map.h,v 1.18 2016/01/18 00:04:36 krw Exp $ */
/*
* partition_map.h - partition map routines
@@ -58,15 +58,6 @@ struct partition_map {
struct partition_map_header * the_map;
int contains_driver;
struct dpme *data;
- int HFS_kind;
-};
-
-/* Identifies the HFS kind. */
-enum {
- kHFS_not = 0, /* ' ' */
- kHFS_std = 1, /* 'h' */
- kHFS_embed = 2, /* 'e' */
- kHFS_plus = 3 /* '+' */
};
extern const char * kFreeType;
diff --git a/sbin/pdisk/pdisk.c b/sbin/pdisk/pdisk.c
index 56ac2fd1c4a..da3e3a1a420 100644
--- a/sbin/pdisk/pdisk.c
+++ b/sbin/pdisk/pdisk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pdisk.c,v 1.44 2016/01/17 23:18:19 krw Exp $ */
+/* $OpenBSD: pdisk.c,v 1.45 2016/01/18 00:04:36 krw Exp $ */
/*
* pdisk - an editor for Apple format partition tables
@@ -45,20 +45,10 @@
#include "validate.h"
#include "file_media.h"
-#define ARGV_CHUNK 5
#define DFLAG_DEFAULT 0
#define LFLAG_DEFAULT 0
#define RFLAG_DEFAULT 0
-enum getopt_values {
- kLongOption = 0,
- kBadOption = '?',
- kOptionArg = 1000,
- kListOption = 1001,
- kLogicalOption = 1002
-};
-
-
int lflag = LFLAG_DEFAULT; /* list the device */
int dflag = DFLAG_DEFAULT; /* turn on debugging commands and printout */
int rflag = RFLAG_DEFAULT; /* open device read Only */