diff options
author | Alan Somers <asomers@FreeBSD.org> | 2019-06-20 15:56:08 +0000 |
---|---|---|
committer | Alan Somers <asomers@FreeBSD.org> | 2019-06-20 15:56:08 +0000 |
commit | e532a99901e26d3961f8f5c0e4969fce86f09456 (patch) | |
tree | 9f1f766c1938ed162a3e5e3d0995132f43da7ea2 /sbin | |
parent | 84879e46c2bea842c3ad7b1b8b26aeb81946f5a8 (diff) | |
parent | 8bd416a216a817cafd1af55e3d7694de327b05a5 (diff) | |
download | src-e532a99901e26d3961f8f5c0e4969fce86f09456.tar.gz src-e532a99901e26d3961f8f5c0e4969fce86f09456.zip |
MFHead @349234
Sponsored by: The FreeBSD Foundation
Notes
Notes:
svn path=/projects/fuse2/; revision=349236
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/camcontrol/camcontrol.c | 2 | ||||
-rw-r--r-- | sbin/dump/dump.8 | 14 | ||||
-rw-r--r-- | sbin/fsck_msdosfs/boot.c | 4 | ||||
-rw-r--r-- | sbin/fsck_msdosfs/dir.c | 9 | ||||
-rw-r--r-- | sbin/fsck_msdosfs/main.c | 16 |
5 files changed, 33 insertions, 12 deletions
diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c index 401f3e389e80..0784fab75a0e 100644 --- a/sbin/camcontrol/camcontrol.c +++ b/sbin/camcontrol/camcontrol.c @@ -2059,7 +2059,7 @@ ata_read_native_max(struct cam_device *device, int retry_count, /*sector_count*/0, /*data_ptr*/NULL, /*dxfer_len*/0, - timeout ? timeout : 1000, + timeout ? timeout : 5000, is48bit); if (error) diff --git a/sbin/dump/dump.8 b/sbin/dump/dump.8 index 5df399a17795..56aea04551f8 100644 --- a/sbin/dump/dump.8 +++ b/sbin/dump/dump.8 @@ -29,7 +29,7 @@ .\" @(#)dump.8 8.3 (Berkeley) 5/1/95 .\" $FreeBSD$ .\" -.Dd June 11, 2018 +.Dd June 13, 2019 .Dt DUMP 8 .Os .Sh NAME @@ -266,6 +266,12 @@ used to update a remote copy of a level 0 dump, since the date changes for each dump. This option sets both dates to the epoch, permitting rsync to be much more efficient when transferring a dump file. +The +.Fl r +option can be used only to create level 0 dumps. +A dump using the +.Fl r +option cannot be used as the basis for a later incremental dump. .It Fl R Be even more rsync-friendly. This option disables the storage of the actual inode access time @@ -277,6 +283,12 @@ The .Fl R option also sets .Fl r . +The +.Fl R +option can be used only to create level 0 dumps. +A dump using the +.Fl R +option cannot be used as the basis for a later incremental dump. .It Fl S Display an estimate of the backup size and the number of tapes required, and exit without actually performing the dump. diff --git a/sbin/fsck_msdosfs/boot.c b/sbin/fsck_msdosfs/boot.c index 9e0958a94544..56bd57d7be13 100644 --- a/sbin/fsck_msdosfs/boot.c +++ b/sbin/fsck_msdosfs/boot.c @@ -49,7 +49,7 @@ readboot(int dosfs, struct bootblock *boot) u_char backup[DOSBOOTBLOCKSIZE]; int ret = FSOK; int i; - + if ((size_t)read(dosfs, block, sizeof block) != sizeof block) { perr("could not read boot block"); return FSFATAL; @@ -219,7 +219,7 @@ readboot(int dosfs, struct bootblock *boot) boot->NumClusters = (boot->NumSectors - boot->ClusterOffset) / boot->bpbSecPerClust; - if (boot->flags&FAT32) + if (boot->flags & FAT32) boot->ClustMask = CLUST32_MASK; else if (boot->NumClusters < (CLUST_RSRVD&CLUST12_MASK)) boot->ClustMask = CLUST12_MASK; diff --git a/sbin/fsck_msdosfs/dir.c b/sbin/fsck_msdosfs/dir.c index e59536f6b5fc..e56bbf80c6bf 100644 --- a/sbin/fsck_msdosfs/dir.c +++ b/sbin/fsck_msdosfs/dir.c @@ -629,6 +629,15 @@ readDosDirSection(int f, struct bootblock *boot, struct fatEntry *fat, vallfn = NULL; } lidx = *p & LRNOMASK; + if (lidx == 0) { + pwarn("invalid long name\n"); + if (!invlfn) { + invlfn = vallfn; + invcl = valcl; + } + vallfn = NULL; + continue; + } t = longName + --lidx * 13; for (k = 1; k < 11 && t < longName + sizeof(longName); k += 2) { diff --git a/sbin/fsck_msdosfs/main.c b/sbin/fsck_msdosfs/main.c index 8425d8adee8a..6802afcefc46 100644 --- a/sbin/fsck_msdosfs/main.c +++ b/sbin/fsck_msdosfs/main.c @@ -87,16 +87,15 @@ main(int argc, char **argv) exit(5); case 'n': alwaysno = 1; - alwaysyes = preen = 0; + alwaysyes = 0; break; case 'y': alwaysyes = 1; - alwaysno = preen = 0; + alwaysno = 0; break; case 'p': preen = 1; - alwaysyes = alwaysno = 0; break; default: @@ -130,9 +129,10 @@ ask(int def, const char *fmt, ...) char prompt[256]; int c; + if (alwaysyes || alwaysno || rdonly) + def = (alwaysyes && !rdonly && !alwaysno); + if (preen) { - if (rdonly) - def = 0; if (def) printf("FIXED\n"); return def; @@ -141,9 +141,9 @@ ask(int def, const char *fmt, ...) va_start(ap, fmt); vsnprintf(prompt, sizeof(prompt), fmt, ap); va_end(ap); - if (alwaysyes || rdonly) { - printf("%s? %s\n", prompt, rdonly ? "no" : "yes"); - return !rdonly; + if (alwaysyes || alwaysno || rdonly) { + printf("%s? %s\n", prompt, def ? "yes" : "no"); + return def; } do { printf("%s? [yn] ", prompt); |