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



On Jan 2, 2012, at 4:27 PM, Mouse wrote:

>>> 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


Better yet: a.start, b.size, fdisk.0.end, etc.  

                --Steve Bellovin, https://www.cs.columbia.edu/~smb







Home | Main Index | Thread Index | Old Index