jnemeth
aa3b5bb2ee
Not all things that write to the disk do something that dk(4) will
...
be interested in. Let individual commands decide if ioctl(DIOCMWEDGES)
should be done. I was conservative and set the flag on any command
that might create/modify/delete partitions in any way.
2018-07-03 03:41:23 +00:00
christos
ffec5f5c18
Kill newline
2015-12-04 16:54:28 +00:00
christos
5c1ccc6e9b
WARNS=6
2015-12-03 02:02:43 +00:00
christos
621ecf3c5e
remove extra assignment
2015-12-03 01:16:21 +00:00
christos
da0a3b4c0b
eliminate static globals so that commands can be re-used.
2015-12-03 01:07:28 +00:00
christos
c458b37c6c
- check errors from map allocation
...
- make map_resize return -1 instead of 0, and handle errors locally
explaining what's going wrong
2015-12-02 20:01:44 +00:00
christos
bbb4a8ab26
refactor more duplicated code.
2015-12-01 19:25:24 +00:00
christos
8ca93e4658
Refactor the command dispatching and help printing logic.
2015-12-01 16:32:19 +00:00
christos
0b43d398b9
Firs step of refactoring, remove all globals, factor out some common code,
...
handle alternate usage but not advertise it.
2015-12-01 09:05:33 +00:00
christos
68bc3825b8
- use gpt_msg to print informational messages (perhaps these should be printed
...
only with -v)
- don't print any messages with gpt_msg if quiet
- print a message if we didn't reconfigure the wedges
2015-12-01 02:03:55 +00:00
christos
e4ed2565fe
- automatically sync the wedge information unless -n is specified.
...
- document the general options in the traditional way.
- split the main program into a separate file.
2015-11-30 19:59:34 +00:00
christos
ca4e0dcdd1
merge the create errors in one place and fix them.
2015-11-29 00:14:46 +00:00
christos
21c34dbb1d
Add internal uuid support, since the linux+macos versions of the library
...
are different than than *bsd ones, and others might not have it at all.
2014-09-30 17:59:59 +00:00
christos
c917041fda
remove compat defines.
2014-09-30 02:12:55 +00:00
christos
a50708a134
minor toolification: need libprop...
2014-09-29 20:28:57 +00:00
jnemeth
53733ab887
Explicitly state which partition was added/modified.
2013-12-10 01:05:00 +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
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
jnemeth
2b199b9458
when calling dehumanize_number() make sure the resulting number is >= 1
2013-11-28 01:37:14 +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
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
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