Changeset 14120
- Timestamp:
- Jul 14, 2013, 11:00:39 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/platform-quota.c
r14117 r14120 28 28 #ifdef HAVE_GETMNTENT 29 29 #ifdef __sun 30 #include <sys/types.h> 31 #include <sys/stat.h> 32 #include <fcntl.h> 30 33 #include <stdio.h> 31 34 #include <sys/mntent.h> … … 74 77 75 78 #ifdef __sun 76 struct mnttab *mnt;79 struct mnttab mnt; 77 80 fp = fopen(_PATH_MOUNTED, "r"); 78 81 if (fp == NULL) 79 82 return NULL; 80 83 81 while (getmntent(fp, mnt))82 if (!tr_strcmp0 (path, mnt ->mnt_mountp))84 while (getmntent(fp, &mnt)) 85 if (!tr_strcmp0 (path, mnt.mnt_mountp)) 83 86 break; 84 87 fclose(fp); 85 return mnt ? mnt->mnt_fstype : NULL;88 return mnt.mnt_special; 86 89 #else 87 90 struct mntent * mnt; … … 125 128 FILE * fp; 126 129 #ifdef __sun 127 struct mnttab *mnt;130 struct mnttab mnt; 128 131 fp = fopen(_PATH_MOUNTED, "r"); 129 132 if (fp == NULL) 130 133 return NULL; 131 while (getmntent(fp, mnt))132 if (!tr_strcmp0 (device, mnt ->mnt_mountp))134 while (getmntent(fp, &mnt)) 135 if (!tr_strcmp0 (device, mnt.mnt_mountp)) 133 136 break; 134 137 fclose(fp); 135 return mnt ? mnt->mnt_fstype : NULL;138 return mnt.mnt_fstype; 136 139 #else 137 140 struct mntent *mnt;
Note: See TracChangeset
for help on using the changeset viewer.