X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=src%2Fgeometry.h;h=64ca4fe4d2403d39c30b31b82d457d7f4a0fbdbe;hb=refs%2Fheads%2Fmaster;hp=1bf387fdbfab7e7408d7b580cbee0c0bfb13945b;hpb=23c77cc092dbbb1e12c47c2b0021d4476b543702;p=rrq%2Fmaintain_lilo.git diff --git a/src/geometry.h b/src/geometry.h index 1bf387f..64ca4fe 100644 --- a/src/geometry.h +++ b/src/geometry.h @@ -1,13 +1,14 @@ -/* geometry.h - Device and file geometry computation */ -/* -Copyright 1992-1998 Werner Almesberger. -Copyright 1999-2005 John Coffman. -All rights reserved. +/* geometry.h - Device and file geometry computation + * + * Copyright 1992-1998 Werner Almesberger + * Copyright 1999-2005 John Coffman + * Copyright 2009-2015 Joachim Wiedorn + * All rights reserved. + * + * Licensed under the terms contained in the file 'COPYING' + * in the source directory. + */ -Licensed under the terms contained in the file 'COPYING' in the -source directory. - -*/ #ifndef GEOMETRY_H #define GEOMETRY_H @@ -21,7 +22,7 @@ struct hd_geometry { unsigned char heads; unsigned char sectors; unsigned short cylinders; - unsigned long start; + uint32_t start; }; /* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x030n/0x031n */ @@ -57,8 +58,8 @@ struct floppy_struct { #define MAJOR(dev) (unsigned int)((((dev_t)(dev) >> 8) & 0xfff) | ((unsigned int) ((dev_t)(dev) >> 32) & ~0xfff)) #define MINOR(dev) (unsigned int)(((dev_t)(dev) & 0xff) | ((unsigned int) ((dev_t)(dev) >> 12) & ~0xff)) #define MKDEV(major,minor) (((minor & 0xff) | ((major & 0xfff) << 8) \ - | (((unsigned long long int) (minor & ~0xff)) << 12) \ - | (((unsigned long long int) (major & ~0xfff)) << 32))) + | (((uint64_t) (minor & ~0xff)) << 12) \ + | (((uint64_t) (major & ~0xfff)) << 32))) #else #include #ifdef major @@ -131,7 +132,7 @@ void geo_get(GEOMETRY *geo,int device,int user_device,int all); is retrieved and the other geometry information is undefined. */ -int geo_open(GEOMETRY *geo,char *name,int flags); +int geo_open(GEOMETRY *geo,const char *name,int flags); /* Opens the specified file or block device, obtains the necessary geometry information and returns the file descriptor. If the name contains a BIOS device specification (xxx:yyy), it is removed and stored in the geometry