Commit Graph

22 Commits

Author SHA1 Message Date
jdc 256b6fecd8 Add the ability to define a partition as starting after another partition.
If chaining is on, display all changed partitions (not just this one).

OK'ed by Christos.
2003-12-29 19:12:29 +00:00
pooka bb95bd5936 Handle partition offset and size as unsigned entities. 2003-10-20 13:20:20 +00:00
grant 97a9e02381 disallow creation of partitions which start beyond (or extend beyond)
the end of the disk.
2002-06-29 15:24:03 +00:00
lukem 8064490359 minor WARNS=2 stuff 2001-10-19 01:16:37 +00:00
christos 7956951247 - KNF printlabel.c
- add a function to print only one partition's info.
- print the partition information if it was modified in interactive mode.
- improve on the chaining code. [still assumes that partition offsets increase
  monotonically]. We could check for overlap too.
2001-05-26 19:48:32 +00:00
lukem 1c5cb88e30 move showinfo() and showpartition() into separate file, for use by
other programs.  slightly change argument signature so that globals
aren't depended upon.
2000-12-24 07:08:02 +00:00
lukem 35ccd2239b - convert to KNF ANSI style guide
- reorder arguments of runcmd(), getnum(), defnum() to be consistent
  with other functions (pass struct disklabel * first)
2000-12-24 05:59:11 +00:00
lukem 6c94f4bee8 in cmd_name(), put the default prompt into a temporary buffer rather
than overwrite the existing d_packname.  noted by enami@.
2000-09-04 02:09:26 +00:00
lukem 4c8c86856e * use strcasecmp() instead of strcmp() so that filesystem type and disk type
searchs (amongst others) are case insensitive.
* in interactive mode (-i), when editing entries display supported disk types
  and filesystem types when given `?' (when ``[?]'' appears in the prompt
  this feature is supported for the question).
* support `m' as a suffix equivalent to `M'
* in interactive mode, be a bit more sensible about handling errors and EOF
* implement dumpnames(), which takes a char ** and size, and displays
  as per ls -F (sorted, listed vertically) but indented by one tab
* don't assume d_typename and d_packname are NUL terminated
* fix up some comments and some warning messages (bad cut & pastos :)
* deprecate deffstypename() and getfstypename()
* be consistent when using sizeof()
2000-08-14 22:37:08 +00:00
abs dfa0f92f2e Use '$' instead of '-' to select remainder of disk interactively 1999-12-17 13:06:49 +00:00
abs 669feec4e3 When setting size of partitions interactively allow '-' for remainder of disk 1999-12-17 12:30:02 +00:00
mrg 5f534fca77 allow changing partition info from inside the interactive handler. 1999-11-26 06:03:09 +00:00
abs b755b885d5 Accept 'Y' for label disk as well as 'y' 1999-09-05 07:27:55 +00:00
christos 563aff8153 Add a 'chain' command in interactive mode that allows you to vary the
size of the partitions, while the starting point gets adjusted automagically.
This chaining works for partitions that are not 'unused'.
1999-05-03 09:45:01 +00:00
christos 7b57bf6d78 Adjust for DKTYPENAME changes. 1998-11-12 16:19:47 +00:00
bouyer dd53470e10 The number of fs types is FSMAXTYPES not DKMAXTYPES.
Correct read of formatted file (used with -e or -R) so that fstype with
spaces will work. Also enlarge the fstype field by 2 chars so that
"Linux Ext2" will not be truncated.
1997-10-13 09:53:26 +00:00
enami 8daf159019 Don't pass return value of writelabel() to strerror(), since
the value is not a errno but just 0 or 1.
1997-09-18 22:20:36 +00:00
christos 5ec7cc78a5 Fix warnings. 1997-06-30 22:51:27 +00:00
christos 5a6005a07e Off by one. 1997-03-18 21:26:43 +00:00
christos 3d71dbfd9b fix reversed test for maxpartitions. 1997-03-09 00:35:44 +00:00
christos 649ae0edb1 Jason says: Use getmaxpartitions(3) to determine the number of partitions
allowed in this architecture.
1997-03-09 00:14:17 +00:00
christos 72fbacb380 Add -i (interactive mode to create/edit labels) inspired by the SunOS/Solaris
format/partition command.
1997-03-08 23:46:08 +00:00