diff options
author | jbj <devnull@localhost> | 1999-01-06 17:33:50 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 1999-01-06 17:33:50 +0000 |
commit | bd626d134d27fa77cae0f26aa7c03649d1bb2ef9 (patch) | |
tree | 0d53c6a480a2ec387c9b872b64d635a33281f064 /lib/fs.c | |
parent | 7eca53f7ea2a634205d7234bc00d1f06e378db39 (diff) | |
download | librpm-tizen-bd626d134d27fa77cae0f26aa7c03649d1bb2ef9.tar.gz librpm-tizen-bd626d134d27fa77cae0f26aa7c03649d1bb2ef9.tar.bz2 librpm-tizen-bd626d134d27fa77cae0f26aa7c03649d1bb2ef9.zip |
propagate "const char *" into rpmlib prototypes.
CVS patchset: 2663
CVS date: 1999/01/06 17:33:50
Diffstat (limited to 'lib/fs.c')
-rw-r--r-- | lib/fs.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -8,7 +8,7 @@ struct fsinfo { }; static struct fsinfo * filesystems; -static char ** fsnames; +static const char ** fsnames; static int numFilesystems; static int getFilesystemList(void); @@ -63,12 +63,13 @@ static int getFilesystemList(void) { fsnames = malloc(sizeof(char *) * (numFilesystems + 1)); for (vm = buf, i = 0; i < num; i++) { + char *fsn; fsnameLength = vm->vmt_data[VMT_STUB].vmt_size; - fsnames[i] = malloc(fsnameLength + 1); - strncpy(fsnames[i],(char *)vm + vm->vmt_data[VMT_STUB].vmt_off, + fsn = malloc(fsnameLength + 1); + strncpy(fsn, (char *)vm + vm->vmt_data[VMT_STUB].vmt_off, fsnameLength); - filesystems[i].mntPoint = fsnames[i]; + filesystems[i].mntPoint = fsnames[i] = fsn; if (stat(filesystems[i].mntPoint, &sb)) { rpmError(RPMERR_STAT, _("failed to stat %s: %s"), fsnames[i], @@ -178,7 +179,7 @@ static int getFilesystemList(void) { } #endif -int rpmGetFilesystemList(char *** listptr, int * num) { +int rpmGetFilesystemList(const char *** listptr, int * num) { if (!fsnames) if (getFilesystemList()) return 1; @@ -189,7 +190,7 @@ int rpmGetFilesystemList(char *** listptr, int * num) { return 0; } -int rpmGetFilesystemUsage(char ** fileList, int_32 * fssizes, int numFiles, +int rpmGetFilesystemUsage(const char ** fileList, int_32 * fssizes, int numFiles, uint_32 ** usagesPtr, int flags) { int_32 * usages; int i, len, j; |