tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: disklabel(8) allows addressing non-existent space



>> until disklabel has the ability for its user to do arithmetic on
>> input,
> This is really not that hard - does it need anything other than +=*/%
> and ()?

For operators?  Probably not, though << would be nice.  (I assume = is
a typo for -.)  If you're doing + - * / % ( ), I can't imagine it's
that hard to add <<, though.  >> might be of some slight use - perhaps
use a different operator symbol (such as @) and have it shift one way
with a positive RHS and the other way with a negative.

The ability to refer to start, end, and size values for
currently-defined partitions in arithmetic would make it far more
useful, eliminating the "you obviously have that number, you just
printed it out, I want you to use it in this expression!" annoyance,
with its accompanying copying errors.

Enter start: end-f + (3 @ 22)
(Using 30524918.)
Enter size: (size-f @ -10) @ 10
(Using 9728000.)

Enter start: start-e - (4 @ 23)
(Using ....)
Enter size: start-e - start-this
(Using ....)

Or, perhaps, provide a way to enter the end and one of the other two
values instead of always the start and size:

Enter end: start-e
Enter size: 4 @ 23

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML                mouse%rodents-montreal.org@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index