Whamcloud - gitweb
Branch b1_6
authoradilger <adilger>
Tue, 2 Sep 2008 22:36:46 +0000 (22:36 +0000)
committeradilger <adilger>
Tue, 2 Sep 2008 22:36:46 +0000 (22:36 +0000)
Add compatibility function for llapi_file_fget_lov_uuid(), to match b1_8
and HEAD.

lustre/include/lustre/liblustreapi.h
lustre/utils/liblustreapi.c

index b3c0adf..ee7307e 100644 (file)
@@ -137,6 +137,9 @@ extern int llapi_ping(char *obd_type, char *obd_name);
 extern int llapi_target_check(int num_types, char **obd_types, char *dir);
 extern int llapi_catinfo(char *dir, char *keyword, char *node_name);
 extern int llapi_file_get_lov_uuid(const char *path, struct obd_uuid *lov_uuid);
+extern int llapi_file_fget_lov_uuid(int fd, struct obd_uuid *lov_uuid);
+/* Use llapi_file_fget_lov_uuid() instead of llapi_file_get_lov_fuuid(), the
+ * latter is deprecated and will be removed in a later Lustre release. */
 extern int llapi_file_get_lov_fuuid(int fd, struct obd_uuid *lov_uuid);
 extern int llapi_lov_get_uuids(int fd, struct obd_uuid *uuidp, int *ost_count);
 extern int llapi_is_lustre_mnttype(const char *type);
index 015c422..7fc6b4e 100644 (file)
@@ -346,7 +346,7 @@ static void find_param_fini(struct find_param *param)
                 free(param->lmd);
 }
 
-int llapi_file_get_lov_fuuid(int fd, struct obd_uuid *lov_name)
+int llapi_file_fget_lov_uuid(int fd, struct obd_uuid *lov_name)
 {
         int rc = ioctl(fd, OBD_IOC_GETNAME, lov_name);
         if (rc) {
@@ -356,6 +356,12 @@ int llapi_file_get_lov_fuuid(int fd, struct obd_uuid *lov_name)
         return rc;
 }
 
+/* deprecated in favour of llapi_file_fget_lov_uuid() in 1.8 and 2.0 */
+int llapi_file_get_lov_fuuid(int fd, struct obd_uuid *lov_name)
+{
+        return llapi_file_fget_lov_uuid(fd, lov_name);
+}
+
 int llapi_file_get_lov_uuid(const char *path, struct obd_uuid *lov_uuid)
 {
         int fd, rc;
@@ -367,7 +373,7 @@ int llapi_file_get_lov_uuid(const char *path, struct obd_uuid *lov_uuid)
                 return rc;
         }
 
-        rc = llapi_file_get_lov_fuuid(fd, lov_uuid);
+        rc = llapi_file_fget_lov_uuid(fd, lov_uuid);
 
         close(fd);
 
@@ -388,7 +394,7 @@ int llapi_lov_get_uuids(int fd, struct obd_uuid *uuidp, int *ost_count)
         int rc = 0, index = 0;
 
         /* Get the lov name */
-        rc = llapi_file_get_lov_fuuid(fd, &lov_name);
+        rc = llapi_file_fget_lov_uuid(fd, &lov_name);
         if (rc)
                 return rc;
 
@@ -430,7 +436,7 @@ static int setup_obd_uuid(DIR *dir, char *dname, struct find_param *param)
         int rc = 0, index;
 
         /* Get the lov name */
-        rc = llapi_file_get_lov_fuuid(dirfd(dir), &lov_uuid);
+        rc = llapi_file_fget_lov_uuid(dirfd(dir), &lov_uuid);
         if (rc) {
                 if (errno != ENOTTY) {
                         rc = errno;