Untwist a twisty bit of logic which gcc for some reason cannot see
through on ia64.
This commit is contained in:
parent
123a5dff98
commit
c6e3e82803
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=108020
@ -486,14 +486,14 @@ cmd_init(struct g_bde_key *gl, int dfd, const char *f_opt, int i_opt, const char
|
|||||||
/* <sector_size> */
|
/* <sector_size> */
|
||||||
p = property_find(params, "sector_size");
|
p = property_find(params, "sector_size");
|
||||||
i = ioctl(dfd, DIOCGSECTORSIZE, &u);
|
i = ioctl(dfd, DIOCGSECTORSIZE, &u);
|
||||||
if (i == 0)
|
|
||||||
sector_size = u;
|
|
||||||
else if (p == NULL)
|
|
||||||
errx(1, "Missing sector_size property");
|
|
||||||
if (p != NULL) {
|
if (p != NULL) {
|
||||||
sector_size = strtoul(p, &q, 0);
|
sector_size = strtoul(p, &q, 0);
|
||||||
if (!*p || *q)
|
if (!*p || *q)
|
||||||
errx(1, "sector_size not a proper number");
|
errx(1, "sector_size not a proper number");
|
||||||
|
} else if (i == 0) {
|
||||||
|
sector_size = u;
|
||||||
|
} else {
|
||||||
|
errx(1, "Missing sector_size property");
|
||||||
}
|
}
|
||||||
if (sector_size & (sector_size - 1))
|
if (sector_size & (sector_size - 1))
|
||||||
errx(1, "sector_size not a power of 2");
|
errx(1, "sector_size not a power of 2");
|
||||||
|
Loading…
Reference in New Issue
Block a user