Skip to contentSkip to conversation

1-based partition numbering

DISCUSSION Yoshinori K. Okuji 2 participants 3 messages Jun 5, 2006

lore
Share & tools
lore
#0 lore raw

So I have changed the partition numbering to 1-based. The strategy is that we use 1-based only for the string representation of a device, while keeping 0-based internally. I think this is more intuitive for hacking. I assume that I have modified all relevant parts, but I might have missed some parts. If you find anything not working well, let me know.

Okuji

#1 lore raw
Quoted 5 lines · Yoshinori K. Okuji

So I have changed the partition numbering to 1-based. The strategy is that we use 1-based only for the string representation of a device, while keeping 0-based internally. I think this is more intuitive for hacking. I assume that I have modified all relevant parts, but I might have missed some parts. If you find anything not working well, let me know.

If I understand correctly, that means a user will specify "(hd,1)" to mean "the first partition on device 'hd'", where they used to specify "(hd,0)"?

I'm very happy to see that; I agree with the decision. However, I was a bit surprised as well. I haven't been following grub-devel that closely recently, but I didn't see any proposal about it. Did I miss it?

-Hollis

#2 lore raw
Quoted 10 lines · Hollis Blanchard
Quoted 5 lines · Yoshinori K. Okuji

So I have changed the partition numbering to 1-based. The strategy is that we use 1-based only for the string representation of a device, while keeping 0-based internally. I think this is more intuitive for hacking. I assume that I have modified all relevant parts, but I might have missed some parts. If you find anything not working well, let me know.

If I understand correctly, that means a user will specify "(hd,1)" to mean "the first partition on device 'hd'", where they used to specify "(hd,0)"?

Exactly.

Quoted 3 lines

I'm very happy to see that; I agree with the decision. However, I was a bit surprised as well. I haven't been following grub-devel that closely recently, but I didn't see any proposal about it. Did I miss it?

Sorry, this has not been discussed here at all. Do you remember that we talked about this on the irc? You mentioned that it would be better to use 1-based, and Marco didn't have any objection, and I didn't, either.

Okuji