Commit Graph

6113 Commits

Author SHA1 Message Date
apb 81c929ad04 Overwrite the seed file from the beginning, using pwrite(2). 2014-01-15 15:05:27 +00:00
joerg 8e1ba910ea Fix arguments for write. 2014-01-15 10:13:25 +00:00
christos 81c8b4d072 use __func__, EXIT_{SUCCESS,FAILURE} 2014-01-10 18:37:18 +00:00
pooka bbfd34f128 give err() some reason to avoid:
sysctl.c:2713:5: error: zero-length gnu_printf format string [-Werror=format-zero-length]
2014-01-10 09:38:56 +00:00
christos 6a0886ad81 perror is obsolete, use warn and add missing paren. 2014-01-08 01:56:20 +00:00
degroote f2475e079d Before scanning, check if the card is up. If it is not the case, exit
with some useful error message. Add some note about this fact in the man
page too.
2014-01-07 20:25:24 +00:00
martin 88bc910896 PR bin/46743: mark the "next free cluster" value in the file system
info block as unitialized.
2014-01-05 12:52:39 +00:00
wiz 2873a037aa New sentence, new line. Remove trailing whitespace. 2014-01-04 15:35:10 +00:00
dholland ed70881960 Add crossreference to fd(4) as noted a while back in PR 45694. Bump date. 2013-12-30 08:43:22 +00:00
christos f28e660726 moved to external 2013-12-25 22:04:52 +00:00
wiz b07680d7fe Bump date for previous. 2013-12-19 07:49:50 +00:00
jnemeth 4fb24d0cac Add the backup subcommand. It dumps the contents of the partition
tables as a plist, which is readable by the restore subcommand.

XXX restore subcommand forthcoming
2013-12-19 06:46:51 +00:00
jnemeth 6f2d9e3758 If we want to GUIDs to display with correct endian, it helps to decode it first. 2013-12-18 03:20:09 +00:00
apb 81b1fb1df7 In all man pages that say:
The -H, -L and -P options are ignored unless the -R option is
    specified.  In addition, these options override each other and the
    command's actions are determined by the last one specified.

Add:

    The default is as if the -P option had been specified.
2013-12-17 09:54:08 +00:00
jnemeth 53733ab887 Explicitly state which partition was added/modified. 2013-12-10 01:05:00 +00:00
wiz d860f590d4 Fix typo ("then" instead of "than") 2013-12-09 09:35:16 +00:00
wiz 918b300e20 Fix typo. 2013-12-09 09:22:44 +00:00
jnemeth 1cb2b94165 Add two new subcommands, "set" and "unset". These were inspired by
FreeBSD's gpart(8), but the code is all mine.  The purpose of these
is to set and unset partition attributes.
2013-12-09 08:03:17 +00:00
jnemeth 66ad0e75ae For the "show -i <entry>" subcommand, print Start and Size both in
terms of number of sectors and bytes.
2013-12-09 01:35:02 +00:00
jnemeth 2098c8504e For the add and resize subcommands, change the -s option. If there is
no suffix, or the suffix is 's' or 'S', size is in sectors (as before)
otherwise size is in bytes.
2013-12-08 09:32:51 +00:00
jnemeth e3e68bccc8 fix off-by-one error 2013-12-08 08:30:01 +00:00
jnemeth 024b3f7622 Don't attempt to create/resize an unaligned partition if the attempt
to create/resize an aligned one failed.  This simplifies the code
and prevents surprises.  If the user wants an unaligned partition
in the case where an aligned one fails, they can simply retry the
command without the "-a" option.  This change was requested by
wiz@, and after some thought I agree with it.
2013-12-06 02:31:31 +00:00
jakllsch 16550bc8bd Use MBR_PTYPE_ defines from <sys/bootblock.h>. 2013-12-04 20:15:51 +00:00
jakllsch e22b4ebb4a Mirror my changes of src/sbin/gpt/create.c 1.4 in migrate.c;
Use less bogus CHS addresses in PMBR.
With the ending head set at 0xff one machine I have will never leave
the initial startup screen if such a disk is present. Additionally,
Wikipedia suggests without citiation that 254 is the maximium allowable
value for the head, and this seems to be the case.
2013-12-04 19:59:47 +00:00
wiz 3d5220baa3 Bump date for previous. 2013-12-04 18:05:21 +00:00
martin 26fd9dad41 Fix err/errx confusion, pointed out by rmind. 2013-12-04 15:10:11 +00:00
martin eb2a978b87 Provide variants of the -s option to allow limiting the tmpfs dynamically
at mount time to 1/Nth or to N percent of the available ram.
2013-12-04 13:30:35 +00:00
bouyer 7e810dc605 Fix pasto in the !ufs2 case (use dp->dp1 and not of dp->dp2).
This would be a problem only when allocating a new data block and the
indir block is already allocated, which explains why automated tests didn't
find it.
Problem reported on tech-kern@ and fix tested by manu@.
2013-12-02 18:46:52 +00:00
jnemeth 925666ef9b Add two new options:
-g which shows the GUID for a partition
-i which shows all the gory details for a particular option

XXX the output format of -i is subject to change
2013-11-30 19:43:53 +00:00
jnemeth 2b199b9458 when calling dehumanize_number() make sure the resulting number is >= 1 2013-11-28 01:37:14 +00:00
christos d873a92b9b CID 1132762: Add error check for negative, to make zero-divide in module
impossible.
2013-11-27 20:40:48 +00:00
christos bb7996ed1a CID 1132764: Bogus test 2013-11-27 20:34:34 +00:00
jnemeth 9299334f79 Remove FreeBSD specific code as per message to tech-userlevel. 2013-11-27 01:47:53 +00:00
jnemeth e066617c02 Only skip past _PATH_DEV if it is actually present. 2013-11-23 08:59:04 +00:00
jnemeth 9ceccfb63b change the "-b blocknr" parameter to accept a "human number" 2013-11-22 04:21:02 +00:00
jnemeth d883a91427 bump date 2013-11-22 03:51:06 +00:00
jnemeth 4f22d16faa In the manpage:
- s/-b number/-b blocknr/
- s/-s count/-s sectors/
- s/-p count/-p partitions/

In the program:
- s/-b lba/-b blocknr/
- s/-s lba/-s sectors/

This makes the documentation in the manpage and the program consistent
and makes it more clear what the parameters are.  Also, "-s lba" was
just plain wrong since LBA stands for Logical Block Address[ing], and
the -s option didn't represent any kind of address, but rather a size.
2013-11-22 03:50:05 +00:00
wiz 00996309f7 shrunk. 2013-11-20 08:11:36 +00:00
jnemeth 0a08058311 Add a resize command. This command was inspired by FreeBSD's gpart(8),
but the code was written by myself.
2013-11-20 08:08:47 +00:00
jnemeth 49ca570b23 delete an errant where it is obvious what the code is doing 2013-11-19 22:41:43 +00:00
jnemeth 477692ee49 When setting a label on the new partition, be sure to set the label
in the secondary partition table as well.
2013-11-19 19:10:29 +00:00
jnemeth a3d649686c update synopsis for add subcommand 2013-11-19 05:07:40 +00:00
jnemeth 650728b4e3 Add two new options to the "add" subcommand:
-a alignment -- attempt to align the start and size of the partition
-l label -- supply a label for the partition

These options were inspired by FreeBSD's gpart(8) command, but the
code was written by me.
2013-11-19 05:03:41 +00:00
christos 611f94995e CID 1125874: Fix memory leak 2013-11-13 21:25:40 +00:00
christos f55ff5e8dd vax specific gcc 4.8.1 hacks 2013-11-09 21:39:27 +00:00
christos 997b1a5c45 put instruction generation bug for the vax for 4.8 too 2013-11-09 16:01:58 +00:00
kefren 88644df51c Bring tunnel src_addr and dst_addr on the same line 2013-11-09 13:10:35 +00:00
kefren beafc35b81 Remove esis reference 2013-11-05 07:42:48 +00:00
apb c2ebc84464 Add a reference to secmodel_extensions(9), to make it a little easier to
figure out how to enable mounts for unprivileged users.  (Why don't we
just explain vfs.generic.usermount in the mount(8) man page?)

Also add another example of different ways in which the "special"
argument is interpreted by different file systems: mount_tmpfs(8)
ignores it.
2013-10-31 07:37:06 +00:00
drochner 958a129dbd -recognize CF cards by the magic value in inquiry data
-kill CFG_ATAPI_MASK, didn't see anything in the specs supporting
 that it exists
2013-10-30 15:37:49 +00:00