diff options
author | joerg <joerg@FreeBSD.org> | 1996-03-24 18:55:39 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1996-03-24 18:55:39 +0000 |
commit | 18d2a8c9e5387edcde838e92ed58f3612eae5509 (patch) | |
tree | 80feac0531a85adb4f38e22d68a6af44b6835fcb /lib/libdisk/disk.c | |
parent | 4f2da6c6e432a586e31d4261f9c4110e109e428a (diff) | |
download | FreeBSD-src-18d2a8c9e5387edcde838e92ed58f3612eae5509.zip FreeBSD-src-18d2a8c9e5387edcde838e92ed58f3612eae5509.tar.gz |
Make libdisk C++ aware:
- add __BEGIN_DECLS and __END_DECLS,
- add a bunch of ``const'' qualifiers all over the place,
- rename the `private' struct member into `private_data' to avoid the
clash with the C++ keyword.
Diffstat (limited to 'lib/libdisk/disk.c')
-rw-r--r-- | lib/libdisk/disk.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libdisk/disk.c b/lib/libdisk/disk.c index cfac7b5..911eece 100644 --- a/lib/libdisk/disk.c +++ b/lib/libdisk/disk.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: disk.c,v 1.19.2.2 1995/06/05 02:24:27 jkh Exp $ + * $Id: disk.c,v 1.20 1995/06/11 19:29:34 rgrimes Exp $ * */ @@ -26,7 +26,7 @@ #define DOSPTYP_EXTENDED 5 #define DOSPTYP_ONTRACK 84 -char *chunk_n[] = { +const char *chunk_n[] = { "whole", "unknown", "fat", @@ -38,13 +38,13 @@ char *chunk_n[] = { }; struct disk * -Open_Disk(char *name) +Open_Disk(const char *name) { return Int_Open_Disk(name,0); } struct disk * -Int_Open_Disk(char *name, u_long size) +Int_Open_Disk(const char *name, u_long size) { int i,fd; struct diskslices ds; @@ -300,7 +300,7 @@ Disk_Names() } void -Set_Boot_Mgr(struct disk *d, u_char *b) +Set_Boot_Mgr(struct disk *d, const u_char *b) { if (d->bootmgr) free(d->bootmgr); @@ -314,7 +314,7 @@ Set_Boot_Mgr(struct disk *d, u_char *b) } void -Set_Boot_Blocks(struct disk *d, u_char *b1, u_char *b2) +Set_Boot_Blocks(struct disk *d, const u_char *b1, const u_char *b2) { if (d->boot1) free(d->boot1); d->boot1 = malloc(512); |