diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2006-05-27 22:30:10 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2006-05-27 22:30:10 +0000 |
commit | 14e6e741659e80c3070d6f1d6bed0da15a8f94da (patch) | |
tree | 2104573682cd2335081d8cba1e639ed1cf2be705 /sbin/fsck_msdos | |
parent | 98ee3c3ba21d44bb73b12a5c7abdb7d7f352fdb9 (diff) |
newline fix + s/perror/xperror since we are
using a home rolled version.
ok pedro@
Diffstat (limited to 'sbin/fsck_msdos')
-rw-r--r-- | sbin/fsck_msdos/boot.c | 16 | ||||
-rw-r--r-- | sbin/fsck_msdos/check.c | 6 | ||||
-rw-r--r-- | sbin/fsck_msdos/dir.c | 24 | ||||
-rw-r--r-- | sbin/fsck_msdos/fat.c | 14 |
4 files changed, 30 insertions, 30 deletions
diff --git a/sbin/fsck_msdos/boot.c b/sbin/fsck_msdos/boot.c index c552bd4d1f2..ddfa5fac2ff 100644 --- a/sbin/fsck_msdos/boot.c +++ b/sbin/fsck_msdos/boot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: boot.c,v 1.10 2004/07/17 02:14:33 deraadt Exp $ */ +/* $OpenBSD: boot.c,v 1.11 2006/05/27 22:30:09 thib Exp $ */ /* $NetBSD: boot.c,v 1.5 1997/10/17 11:19:23 ws Exp $ */ /* @@ -35,7 +35,7 @@ #ifndef lint -static char rcsid[] = "$OpenBSD: boot.c,v 1.10 2004/07/17 02:14:33 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: boot.c,v 1.11 2006/05/27 22:30:09 thib Exp $"; #endif /* not lint */ #include <stdlib.h> @@ -55,7 +55,7 @@ readboot(int dosfs, struct bootblock *boot) int ret = FSOK; if (read(dosfs, block, sizeof block) < sizeof block) { - perror("could not read boot block"); + xperror("could not read boot block"); return (FSFATAL); } @@ -107,7 +107,7 @@ readboot(int dosfs, struct bootblock *boot) != boot->FSInfo * boot->BytesPerSec || read(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { - perror("could not read fsinfo block"); + xperror("could not read fsinfo block"); return FSFATAL; } if (memcmp(fsinfo, "RRaA", 4) @@ -134,7 +134,7 @@ readboot(int dosfs, struct bootblock *boot) != boot->FSInfo * boot->BytesPerSec || write(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { - perror("Unable to write FSInfo"); + xperror("Unable to write FSInfo"); return FSFATAL; } ret = FSBOOTMOD; @@ -153,7 +153,7 @@ readboot(int dosfs, struct bootblock *boot) if (lseek(dosfs, boot->Backup * boot->BytesPerSec, SEEK_SET) != boot->Backup * boot->BytesPerSec || read(dosfs, backup, sizeof backup) != sizeof backup) { - perror("could not read backup bootblock"); + xperror("could not read backup bootblock"); return FSFATAL; } if (memcmp(block, backup, DOSBOOTBLOCKSIZE)) { @@ -232,7 +232,7 @@ writefsinfo(int dosfs, struct bootblock *boot) if (lseek(dosfs, boot->FSInfo * boot->BytesPerSec, SEEK_SET) != boot->FSInfo * boot->BytesPerSec || read(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { - perror("could not read fsinfo block"); + xperror("could not read fsinfo block"); return FSFATAL; } fsinfo[0x1e8] = (u_char)boot->FSFree; @@ -247,7 +247,7 @@ writefsinfo(int dosfs, struct bootblock *boot) != boot->FSInfo * boot->BytesPerSec || write(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { - perror("Unable to write FSInfo"); + xperror("Unable to write FSInfo"); return FSFATAL; } /* diff --git a/sbin/fsck_msdos/check.c b/sbin/fsck_msdos/check.c index 3ddf010528c..a2af26aa2a1 100644 --- a/sbin/fsck_msdos/check.c +++ b/sbin/fsck_msdos/check.c @@ -1,4 +1,4 @@ -/* $OpenBSD: check.c,v 1.10 2004/07/17 02:14:33 deraadt Exp $ */ +/* $OpenBSD: check.c,v 1.11 2006/05/27 22:30:09 thib Exp $ */ /* $NetBSD: check.c,v 1.8 1997/10/17 11:19:29 ws Exp $ */ /* @@ -35,7 +35,7 @@ #ifndef lint -static char rcsid[] = "$OpenBSD: check.c,v 1.10 2004/07/17 02:14:33 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: check.c,v 1.11 2006/05/27 22:30:09 thib Exp $"; #endif /* not lint */ #include <stdlib.h> @@ -72,7 +72,7 @@ checkfilesys(const char *fname) printf("\n"); if (dosfs < 0) { - perror("Can't open"); + xperror("Can't open"); return (8); } diff --git a/sbin/fsck_msdos/dir.c b/sbin/fsck_msdos/dir.c index 589dfddd212..e45647e7ecc 100644 --- a/sbin/fsck_msdos/dir.c +++ b/sbin/fsck_msdos/dir.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dir.c,v 1.19 2004/07/17 02:14:33 deraadt Exp $ */ +/* $OpenBSD: dir.c,v 1.20 2006/05/27 22:30:09 thib Exp $ */ /* $NetBSD: dir.c,v 1.11 1997/10/17 11:19:35 ws Exp $ */ /* @@ -37,7 +37,7 @@ #ifndef lint -static char rcsid[] = "$OpenBSD: dir.c,v 1.19 2004/07/17 02:14:33 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: dir.c,v 1.20 2006/05/27 22:30:09 thib Exp $"; #endif /* not lint */ #include <stdio.h> @@ -234,7 +234,7 @@ resetDosDirSection(struct bootblock *boot, struct fatEntry *fat) if (!(buffer = malloc(b1 > b2 ? b1 : b2)) || !(delbuf = malloc(b2)) || !(rootDir = newDosDirEntry())) { - perror("No space for directory"); + xperror("No space for directory"); return (FSFATAL); } (void)memset(rootDir, 0, sizeof *rootDir); @@ -324,7 +324,7 @@ delete(int f, struct bootblock *boot, struct fatEntry *fat, cl_t startcl, off *= boot->BytesPerSec; if (lseek(f, off, SEEK_SET) != off || read(f, delbuf, clsz) != clsz) { - perror("Unable to read directory"); + xperror("Unable to read directory"); return (FSFATAL); } while (s < e) { @@ -333,7 +333,7 @@ delete(int f, struct bootblock *boot, struct fatEntry *fat, cl_t startcl, } if (lseek(f, off, SEEK_SET) != off || write(f, delbuf, clsz) != clsz) { - perror("Unable to write directory"); + xperror("Unable to write directory"); return (FSFATAL); } if (startcl == endcl) @@ -467,7 +467,7 @@ readDosDirSection(int f, struct bootblock *boot, struct fatEntry *fat, off *= boot->BytesPerSec; if (lseek(f, off, SEEK_SET) != off || read(f, buffer, last) != last) { - perror("Unable to read directory"); + xperror("Unable to read directory"); return (FSFATAL); } last /= 32; @@ -811,7 +811,7 @@ readDosDirSection(int f, struct bootblock *boot, struct fatEntry *fat, /* create directory tree node */ if (!(d = newDosDirEntry())) { - perror("No space for directory"); + xperror("No space for directory"); return (FSFATAL); } (void)memcpy(d, &dirent, sizeof(struct dosDirEntry)); @@ -820,7 +820,7 @@ readDosDirSection(int f, struct bootblock *boot, struct fatEntry *fat, /* Enter this directory into the todo list */ if (!(n = newDirTodo())) { - perror("No space for todo list"); + xperror("No space for todo list"); return (FSFATAL); } n->next = pendingDirectories; @@ -837,7 +837,7 @@ readDosDirSection(int f, struct bootblock *boot, struct fatEntry *fat, last *= 32; if (lseek(f, off, SEEK_SET) != off || write(f, buffer, last) != last) { - perror("Unable to write directory"); + xperror("Unable to write directory"); return (FSFATAL); } mod &= ~THISMOD; @@ -927,7 +927,7 @@ reconnect(int dosfs, struct bootblock *boot, struct fatEntry *fat, cl_t head) if (!lfbuf) { lfbuf = malloc(boot->ClusterSize); if (!lfbuf) { - perror("No space for buffer"); + xperror("No space for buffer"); return (FSFATAL); } p = NULL; @@ -951,7 +951,7 @@ reconnect(int dosfs, struct bootblock *boot, struct fatEntry *fat, cl_t head) + boot->ClusterOffset * boot->BytesPerSec; if (lseek(dosfs, lfoff, SEEK_SET) != lfoff || read(dosfs, lfbuf, boot->ClusterSize) != boot->ClusterSize) { - perror("could not read LOST.DIR"); + xperror("could not read LOST.DIR"); return (FSFATAL); } p = lfbuf; @@ -981,7 +981,7 @@ reconnect(int dosfs, struct bootblock *boot, struct fatEntry *fat, cl_t head) fat[head].flags |= FAT_USED; if (lseek(dosfs, lfoff, SEEK_SET) != lfoff || write(dosfs, lfbuf, boot->ClusterSize) != boot->ClusterSize) { - perror("could not write LOST.DIR"); + xperror("could not write LOST.DIR"); return (FSFATAL); } return (FSDIRMOD); diff --git a/sbin/fsck_msdos/fat.c b/sbin/fsck_msdos/fat.c index b81c3188fbc..bf337ab081f 100644 --- a/sbin/fsck_msdos/fat.c +++ b/sbin/fsck_msdos/fat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fat.c,v 1.14 2006/04/02 21:38:56 djm Exp $ */ +/* $OpenBSD: fat.c,v 1.15 2006/05/27 22:30:09 thib Exp $ */ /* $NetBSD: fat.c,v 1.8 1997/10/17 11:19:53 ws Exp $ */ /* @@ -35,7 +35,7 @@ #ifndef lint -static char rcsid[] = "$OpenBSD: fat.c,v 1.14 2006/04/02 21:38:56 djm Exp $"; +static char rcsid[] = "$OpenBSD: fat.c,v 1.15 2006/05/27 22:30:09 thib Exp $"; #endif /* not lint */ #include <stdlib.h> @@ -97,7 +97,7 @@ readfat(int fs, struct bootblock *boot, int no, struct fatEntry **fp) fat = calloc(boot->NumClusters, sizeof(struct fatEntry)); buffer = malloc(boot->FATsecs * boot->BytesPerSec); if (fat == NULL || buffer == NULL) { - perror("No space for FAT"); + xperror("No space for FAT"); if (fat) free(fat); return (FSFATAL); @@ -107,7 +107,7 @@ readfat(int fs, struct bootblock *boot, int no, struct fatEntry **fp) off *= boot->BytesPerSec; if (lseek(fs, off, SEEK_SET) != off) { - perror("Unable to read FAT"); + xperror("Unable to read FAT"); free(buffer); free(fat); return (FSFATAL); @@ -115,7 +115,7 @@ readfat(int fs, struct bootblock *boot, int no, struct fatEntry **fp) if (read(fs, buffer, boot->FATsecs * boot->BytesPerSec) != boot->FATsecs * boot->BytesPerSec) { - perror("Unable to read FAT"); + xperror("Unable to read FAT"); free(buffer); free(fat); return (FSFATAL); @@ -432,7 +432,7 @@ writefat(int fs, struct bootblock *boot, struct fatEntry *fat) buffer = malloc(fatsz = boot->FATsecs * boot->BytesPerSec); if (buffer == NULL) { - perror("No space for FAT"); + xperror("No space for FAT"); return (FSFATAL); } (void)memset(buffer, 0, fatsz); @@ -488,7 +488,7 @@ writefat(int fs, struct bootblock *boot, struct fatEntry *fat) off *= boot->BytesPerSec; if (lseek(fs, off, SEEK_SET) != off || write(fs, buffer, fatsz) != fatsz) { - perror("Unable to write FAT"); + xperror("Unable to write FAT"); ret = FSFATAL; /* Return immediately? XXX */ } } |