diff options
Diffstat (limited to 'sbin/pdisk')
-rw-r--r-- | sbin/pdisk/file_media.c | 23 | ||||
-rw-r--r-- | sbin/pdisk/file_media.h | 4 | ||||
-rw-r--r-- | sbin/pdisk/partition_map.c | 4 |
3 files changed, 3 insertions, 28 deletions
diff --git a/sbin/pdisk/file_media.c b/sbin/pdisk/file_media.c index d08dd9cc921..8b2f038a449 100644 --- a/sbin/pdisk/file_media.c +++ b/sbin/pdisk/file_media.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file_media.c,v 1.32 2016/01/18 14:55:08 krw Exp $ */ +/* $OpenBSD: file_media.c,v 1.33 2016/01/18 15:30:00 krw Exp $ */ /* * file_media.c - @@ -83,11 +83,8 @@ open_file_as_media(char *file, int oflag) off = lseek(fd, 0, SEEK_END); a->size_in_bytes = (long long) off; a->fd = fd; - a->regular_file = 0; if (fstat(fd, &info) < 0) { warn("can't stat file '%s'", file); - } else { - a->regular_file = S_ISREG(info.st_mode); } } else { close(fd); @@ -181,21 +178,3 @@ close_file_media(struct file_media * a) close(a->fd); return 1; } - - -long -os_reload_file_media(struct file_media * a) -{ - long rtn_value; - - rtn_value = 0; - if (a == 0) { - /* no media */ - } else if (a->regular_file) { - /* okay - nothing to do */ - rtn_value = 1; - } else { - rtn_value = 1; - } - return rtn_value; -} diff --git a/sbin/pdisk/file_media.h b/sbin/pdisk/file_media.h index 7fcac98df38..f94b6ca1a9f 100644 --- a/sbin/pdisk/file_media.h +++ b/sbin/pdisk/file_media.h @@ -1,4 +1,4 @@ -/* $OpenBSD: file_media.h,v 1.10 2016/01/17 19:39:20 krw Exp $ */ +/* $OpenBSD: file_media.h,v 1.11 2016/01/18 15:30:00 krw Exp $ */ /* * file_media.h - @@ -34,13 +34,11 @@ struct file_media { long long size_in_bytes; /* offset granularity */ int fd; - int regular_file; }; struct file_media *open_file_as_media(char *, int); long read_file_media(struct file_media *, long long, unsigned long, void *); long write_file_media(struct file_media *, long long, unsigned long, void *); long close_file_media(struct file_media *m); -long os_reload_file_media(struct file_media *m); #endif /* __file_media__ */ diff --git a/sbin/pdisk/partition_map.c b/sbin/pdisk/partition_map.c index 53533abc98e..dafc0483199 100644 --- a/sbin/pdisk/partition_map.c +++ b/sbin/pdisk/partition_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: partition_map.c,v 1.38 2016/01/18 02:50:01 krw Exp $ */ +/* $OpenBSD: partition_map.c,v 1.39 2016/01/18 15:30:00 krw Exp $ */ /* * partition_map.c - partition map routines @@ -295,8 +295,6 @@ write_partition_map(struct partition_map_header * map) warn("Unable to write block %d", i); } } - - os_reload_file_media(map->m); } |