summaryrefslogtreecommitdiffstats
path: root/lib/libdisk/write_disk.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-04-29 05:03:02 +0000
committerjkh <jkh@FreeBSD.org>1996-04-29 05:03:02 +0000
commitb431239bb3be5c214ce52625c63686706e1f7c80 (patch)
tree9e00edae9b557a40ed455a869750b34be9d1b3eb /lib/libdisk/write_disk.c
parent9059910165e6899031d64bb8af99775f82d4cf5e (diff)
downloadFreeBSD-src-b431239bb3be5c214ce52625c63686706e1f7c80.zip
FreeBSD-src-b431239bb3be5c214ce52625c63686706e1f7c80.tar.gz
Move some warn()'s into DEBUG space since I don't need them coming
out in my curses interfaces and spamming my screen.
Diffstat (limited to 'lib/libdisk/write_disk.c')
-rw-r--r--lib/libdisk/write_disk.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/libdisk/write_disk.c b/lib/libdisk/write_disk.c
index 00b2946..dceab4d 100644
--- a/lib/libdisk/write_disk.c
+++ b/lib/libdisk/write_disk.c
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: write_disk.c,v 1.15 1995/08/26 04:57:03 davidg Exp $
+ * $Id: write_disk.c,v 1.16 1995/12/07 10:33:27 peter Exp $
*
*/
@@ -58,7 +58,9 @@ Write_FreeBSD(int fd, struct disk *new, struct disk *old, struct chunk *c1)
if (!strcmp(c2->name,"X")) continue;
j = c2->name[5] - 'a';
if (j < 0 || j >= MAXPARTITIONS || j == RAW_PART) {
+#ifdef DEBUG
warn("Weird parititon letter %c",c2->name[5]);
+#endif
continue;
}
dl->d_partitions[j].p_size = c2->size;
@@ -133,7 +135,9 @@ Write_Disk(struct disk *d1)
fd = open(device,O_RDWR);
if (fd < 0) {
+#ifdef DEBUG
warn("open(%s) failed",device);
+#endif
return 1;
}
@@ -225,8 +229,10 @@ Write_Disk(struct disk *d1)
i = 1;
i = ioctl(fd,DIOCSYNCSLICEINFO,&i);
+#ifdef DEBUG
if (i != 0)
warn("ioctl(DIOCSYNCSLICEINFO)");
+#endif
close(fd);
return 0;
}
OpenPOWER on IntegriCloud