]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
get rid of cursor and more parameters for getparents functions.
authorTim Shimmin <tes@sgi.com>
Wed, 15 Feb 2006 02:50:54 +0000 (02:50 +0000)
committerTim Shimmin <tes@sgi.com>
Wed, 15 Feb 2006 02:50:54 +0000 (02:50 +0000)
Slight function namechange at the same time.
Merge of master-melb:xfs-cmds:25194a by kenmcd.

  Remove cursor and more parameters.

include/handle.h
include/jdm.h
libhandle/handle.c
libhandle/jdm.c

index 777df22c749c2d06eb299f5385654f3069c0f08b..b211a2f4526ec173e18f27cd6acd5b143ac4b9d1 100644 (file)
@@ -24,7 +24,6 @@ extern "C" {
 
 struct fsdmidata;
 struct attrlist_cursor;
-struct parent_cursor;
 struct parent;
 
 extern int  path_to_handle (char *__path, void **__hanp, size_t *__hlen);
@@ -41,14 +40,12 @@ extern int  attr_multi_by_handle (void *__hanp, size_t __hlen, void *__buf,
 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);
 
index 0410a9ea3a3097f080f5b5b5f23949939d8557e2..c39d815e90151fcba37ee10853cad7f41f7eac5f 100644 (file)
@@ -24,7 +24,6 @@ typedef void  jdm_filehandle_t;       /* filehandle */
 
 struct xfs_bstat;
 struct attrlist_cursor;
-struct parent_cursor;
 struct parent;
 
 extern jdm_fshandle_t *
@@ -63,18 +62,16 @@ jdm_attr_list(      jdm_fshandle_t *fshp,
                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 )
index 4bd052b23cf087cbce02108494e64b168da885d3..c535f2ff84a0ea74ee18105b6ec3f3c95af264cf 100644 (file)
@@ -370,86 +370,28 @@ attr_list_by_handle(
 }
 
 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
index bac68c0a93260ba5ab91aa451a5ee3cdfad8d20b..a724b61d1bbd2ed354d4710e9ca0d6734e3bdc30 100644 (file)
@@ -174,43 +174,21 @@ jdm_attr_list(    jdm_fshandle_t *fshp,
 }
 
 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
 }