Slight function namechange at the same time.
Merge of master-melb:xfs-cmds:25194a by kenmcd.
Remove cursor and more parameters.
struct fsdmidata;
struct attrlist_cursor;
-struct parent_cursor;
struct parent;
extern int path_to_handle (char *__path, void **__hanp, size_t *__hlen);
extern int attr_list_by_handle (void *__hanp, size_t __hlen, void *__buf,
size_t __bufsize, int __flags,
struct attrlist_cursor *__cursor);
-extern int getparents_by_handle(void *__hanp, size_t __hlen,
- struct parent *__buf, size_t __bufsize,
- struct parent_cursor *__cursor,
- unsigned int *__count, unsigned int *__more);
-extern int getparentpaths_by_handle(void *__hanp, size_t __hlen,
- struct parent *__buf, size_t __bufsize,
- struct parent_cursor *__cursor,
- unsigned int *__count, unsigned int *__more);
+extern int parents_by_handle(void *__hanp, size_t __hlen,
+ struct parent *__buf, size_t __bufsize,
+ unsigned int *__count);
+extern int parentpaths_by_handle(void *__hanp, size_t __hlen,
+ struct parent *__buf, size_t __bufsize,
+ unsigned int *__count);
extern int fssetdm_by_handle (void *__hanp, size_t __hlen,
struct fsdmidata *__fsdmi);
struct xfs_bstat;
struct attrlist_cursor;
-struct parent_cursor;
struct parent;
extern jdm_fshandle_t *
struct attrlist_cursor *cursor);
extern int
-jdm_getparents( jdm_fshandle_t *fshp,
+jdm_parents( jdm_fshandle_t *fshp,
xfs_bstat_t *statp,
struct parent *bufp, size_t bufsz,
- struct parent_cursor *cursor,
- unsigned int *count, unsigned int *more);
+ unsigned int *count);
extern int
-jdm_getparentpaths( jdm_fshandle_t *fshp,
+jdm_parentpaths( jdm_fshandle_t *fshp,
xfs_bstat_t *statp,
struct parent *bufp, size_t bufsz,
- struct parent_cursor *cursor,
- unsigned int *count, unsigned int *more);
+ unsigned int *count);
/* macro for determining the size of a structure member */
#define sizeofmember( t, m ) sizeof( ( ( t * )0 )->m )
}
int
-getparents_by_handle(
+parents_by_handle(
void *hanp,
size_t hlen,
parent_t *buf,
size_t bufsiz,
- parent_cursor_t *cursor,
- unsigned int *count,
- unsigned int *more)
+ unsigned int *count)
+
{
-#if !defined(__sgi__)
errno = EOPNOTSUPP;
return -1;
-#else
-
- int error, fd;
- char *path;
- xfs_fsop_getparents_handlereq_t gphreq;
-
- if ((fd = handle_to_fsfd(hanp, &path)) < 0)
- return -1;
-
- gphreq.hreq.fd = 0;
- gphreq.hreq.path = NULL;
- gphreq.hreq.oflags = O_LARGEFILE;
- gphreq.hreq.ihandle = hanp;
- gphreq.hreq.ihandlen = hlen;
- gphreq.hreq.ohandle = NULL;
- gphreq.hreq.ohandlen = NULL;
- memcpy(&gphreq.pos, cursor, sizeof(gphreq.pos));
- gphreq.buflen = bufsiz;
- gphreq.buffer = buf;
- gphreq.ocount = count;
- gphreq.omore = more;
-
- error = xfsctl(path, fd, XFS_IOC_GETPARENTS, &gphreq);
-
- memcpy(cursor, &gphreq.pos, sizeof(gphreq.pos));
- return error;
-#endif
}
int
-getparentpaths_by_handle(
+parentpaths_by_handle(
void *hanp,
size_t hlen,
parent_t *buf,
size_t bufsiz,
- parent_cursor_t *cursor,
- unsigned int *count,
- unsigned int *more)
+ unsigned int *count)
{
-#if !defined(__sgi__)
errno = EOPNOTSUPP;
return -1;
-#else
- int error, fd;
- char *path;
- xfs_fsop_getparents_handlereq_t gphreq;
-
- if ((fd = handle_to_fsfd(hanp, &path)) < 0)
- return -1;
-
- gphreq.hreq.fd = 0;
- gphreq.hreq.path = NULL;
- gphreq.hreq.oflags = O_LARGEFILE;
- gphreq.hreq.ihandle = hanp;
- gphreq.hreq.ihandlen = hlen;
- gphreq.hreq.ohandle = NULL;
- gphreq.hreq.ohandlen = NULL;
- memcpy(&gphreq.pos, cursor, sizeof(gphreq.pos));
- gphreq.buflen = bufsiz;
- gphreq.buffer = buf;
- gphreq.ocount = count;
- gphreq.omore = more;
-
- error = xfsctl(path, fd, XFS_IOC_GETPARENTPATHS, &gphreq);
-
- memcpy(cursor, &gphreq.pos, sizeof(gphreq.pos));
- return error;
-#endif
}
int
}
int
-jdm_getparents( jdm_fshandle_t *fshp,
+jdm_parents( jdm_fshandle_t *fshp,
xfs_bstat_t *statp,
parent_t *bufp, size_t bufsz,
- parent_cursor_t *cursor,
- unsigned int *count, unsigned int *more)
+ unsigned int *count)
{
-#if !defined(__sgi__)
errno = EOPNOTSUPP;
return -1;
-#else
- register fshandle_t *fshandlep = ( fshandle_t * )fshp;
- filehandle_t filehandle;
-
- jdm_fill_filehandle( &filehandle, fshandlep, statp );
- return getparents_by_handle (( void * )&filehandle,
- sizeof( filehandle ),
- bufp, bufsz, cursor, count, more);
-#endif
}
int
-jdm_getparentpaths( jdm_fshandle_t *fshp,
+jdm_parentpaths( jdm_fshandle_t *fshp,
xfs_bstat_t *statp,
parent_t *bufp, size_t bufsz,
- parent_cursor_t *cursor,
- unsigned int *count, unsigned int *more)
+ unsigned int *count)
{
-#if !defined(__sgi__)
errno = EOPNOTSUPP;
return -1;
-#else
- register fshandle_t *fshandlep = ( fshandle_t * )fshp;
- filehandle_t filehandle;
-
- jdm_fill_filehandle( &filehandle, fshandlep, statp );
- return getparentpaths_by_handle (( void * )&filehandle,
- sizeof( filehandle ),
- bufp, bufsz, cursor, count, more);
-#endif
}