On Tue, Oct 20, 2015 at 01:01:23PM +0200, Jan Tulak wrote: > I'm resubmitting this patch from my OS X set - it wasn't included with > others, nor in the current for-next, and I didn't got any review/reply > to this last iteration. > > So my guess is it fell under the sofa, forgotten... :-) > > ......... > > UPDATE: > - refactor ifdefs to platform_ functions > - refactor also the other ifdef which I forgot to change before > - (and rebase against current for-next) > > For what fsr needs, mntinfo can be used instead of mntent on some > platforms. Exctract the platform-specific code to platform headers. > > Signed-off-by: Jan Tulak <jtulak@xxxxxxxxxx> Code structure looks good now, but build warnings on linux: [CC] xfs_fsr.o xfs_fsr.c: In function ¿find_mountpoint_check¿: xfs_fsr.c:184:26: warning: passing argument 2 of ¿stat64¿ from incompatible pointer type if (stat64(t->mnt_dir, &ms) < 0) ^ In file included from /usr/include/features.h:374:0, from /usr/include/stdio.h:27, from ../include/platform_defs.h:24, from ../include/libxfs.h:23, from xfs_fsr.c:19: /usr/include/x86_64-linux-gnu/sys/stat.h:502:1: note: expected ¿struct stat64 *¿ but argument is of type ¿struct stat64 **¿ __NTH (stat64 (const char *__path, struct stat64 *__statbuf)) ^ xfs_fsr.c:195:29: warning: passing argument 2 of ¿stat64¿ from incompatible pointer type if (stat64(t->mnt_fsname, &ms) < 0) ^ In file included from /usr/include/features.h:374:0, from /usr/include/stdio.h:27, from ../include/platform_defs.h:24, from ../include/libxfs.h:23, from xfs_fsr.c:19: /usr/include/x86_64-linux-gnu/sys/stat.h:502:1: note: expected ¿struct stat64 *¿ but argument is of type ¿struct stat64 **¿ __NTH (stat64 (const char *__path, struct stat64 *__statbuf)) ^ xfs_fsr.c: In function ¿initallfs¿: xfs_fsr.c:435:39: warning: passing argument 2 of ¿platform_mntent_next¿ from incompatible pointer type while (platform_mntent_next(&cursor, &mp) == 0) { ^ In file included from ../include/xfs.h:37:0, from ../include/libxfs.h:24, from xfs_fsr.c:19: ../include/xfs/linux.h:166:19: note: expected ¿struct mntent *¿ but argument is of type ¿struct mntent **¿ static inline int platform_mntent_next(struct mntent_cursor * cursor, struct mntent * t) ^ xfs_fsr.c:436:37: warning: passing argument 2 of ¿find_mountpoint_check¿ from incompatible pointer type mntp = find_mountpoint_check(&sb, &mp, &ms); ^ xfs_fsr.c:181:1: note: expected ¿struct mntent *¿ but argument is of type ¿struct mntent **¿ find_mountpoint_check(struct stat64 *sb, struct mntent *t, struct stat64 *ms) ^ [LD] libxcmd.la Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs