tech-userlevel archive

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

Re: gpt command arguments



On Nov 30,  4:26pm, Christos Zoulas wrote:
} 
} I am trying to make the gpt command work better and be more inline with
} other NetBSD commands so I would like to change it from:
} 
}     gpt <global-flags> command <command-flags> <device> ...

     As you know, this is the syntax we inherited when gpt was
imported from FreeBSD.  Personally, I've always found the syntax
to be rather weird.

} (which does not make a lot of sense, since why would you operate with the
} same command on multiple devices...)

     Although it is something that would be done relatively rarely,
it does work:

i386devel: {123} gpt header wd0 wd1
Media Size: 160041885696 (149G)
Sector Size: 512
Number of Sectors: 312581808 (298M)

Header Information:
- GPT Header not found
Media Size: 160041885696 (149G)
Sector Size: 512
Number of Sectors: 312581808 (298M)

Header Information:
- GPT Revision: 65536
- First Data Sector: 34
- Last Data Sector: 312581774 (298M)
- Media GUID: 2b56cc42-5427-11e4-b247-40167eaab9c8
- Number of GPT Entries: 128

I can see doing this type of operation when you want information
about mulitple disks, when you want to run 'gpt create' on multiple
disks, or when you want to update mirror drives.  However, even
given that, I think this is something that would be relatively
rare.

} to:
} 
}     gpt <global-flags> <device> command <command-flags>

     This syntax makes more sense to me.

} do that it is more like, drvctl, dkctl, gpioctl, pcictl etc.
} 
} This is going to cause scripts that have the command embedded in them to
} break, but always non-destructively.

     This would be bad.  The command has been around long enough
now and has been in other operating systems, that changing the
syntax would be a pretty major nuisance.

} One way to achieve compatibility is to 'ln gpt gptctl' and have the new
} behavior only with gptctl, but I think this is more confusing.

     I'm not sure I like the name, gptctl.  It doesn't go the way
we've used *ctl.  Ignoring sysctl, all other *ctls are about
controlling devices, and gptctl isn't really about controlling
devices.  However, quibbling over the name is a minor thing and
shouldn't put off doing the work to improve things.

}-- End of excerpt from Christos Zoulas


Home | Main Index | Thread Index | Old Index