Change the type of real_dev_bsize variable from long to u_int.

The DIOCGSECTORSIZE takes u_int * as an argument, using long *
causes failures on big-endian targets.

Diagnosed by:	Michiel Boland <boland37 xs4all nl>
PR:	sparc64/163460
Tested by:	pho (x86), flo (sparc64)
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2011-12-20 20:39:00 +00:00
parent 5e95ed1f11
commit 6f100596e5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=228751
2 changed files with 2 additions and 2 deletions

View File

@ -268,7 +268,7 @@ char snapname[BUFSIZ]; /* when doing snapshots, the name of the file */
char *cdevname; /* name of device being checked */
long dev_bsize; /* computed value of DEV_BSIZE */
long secsize; /* actual disk sector size */
long real_dev_bsize;
u_int real_dev_bsize; /* actual disk sector size, not overriden */
char nflag; /* assume a no response */
char yflag; /* assume a yes response */
int bkgrdflag; /* use a snapshot to run on an active system */

View File

@ -206,7 +206,7 @@ opendisk(const char *devnam)
&real_dev_bsize) == -1)
real_dev_bsize = secsize;
if (debug)
printf("dev_bsize %ld\n", real_dev_bsize);
printf("dev_bsize %u\n", real_dev_bsize);
}
/*