* AFS is a non OS specific filesystem so see if this path is on an AFS filesystem
* Set the BACL_FLAG_SAVE_AFS flag if it is. If not set the BACL_FLAG_SAVE_NATIVE flag.
*/
- if (fstype_equals(jcr->last_fname, "afs")) {
+ if (fstype_cmp(ff_pkt, "afs")) {
jcr->acl_ctx->flags |= BACL_FLAG_SAVE_AFS;
} else {
jcr->acl_ctx->flags |= BACL_FLAG_SAVE_NATIVE;
* AFS is a non OS specific filesystem so see if this path is on an AFS filesystem
* Set the BACL_FLAG_RESTORE_AFS flag if it is. If not set the BACL_FLAG_RETORE_NATIVE flag.
*/
- if (fstype_equals(jcr->last_fname, "afs")) {
+ if (fstype_cmp(ff_pkt, "afs")) {
jcr->acl_ctx->flags |= BACL_FLAG_RESTORE_AFS;
} else {
jcr->acl_ctx->flags |= BACL_FLAG_RESTORE_NATIVE;
}
}
+/* Compare directly the FS from a fname with a string */
+bool fstype_cmp(FF_PKT *ff_pkt, const char fsname)
+{
+ char buf[256];
+ if (fstype(ff_pkt, buf, sizeof(buf))) {
+ return (strcmp(buf, fsname) == 0);
+ }
+ return false;
+}
/*
* These functions should be implemented for each OS
/* from fstype.c */
bool fstype(FF_PKT *ff_pkt, char *fs, int fslen);
-bool fstype_equals(const char *fname, const char *fstype_name);
+bool fstype_cmp(FF_PKT *ff_pkt, const char *fstype_name);
/* from drivetype.c */
bool drivetype(const char *fname, char *fs, int fslen);