+ /**
+ * See if we are changing from one device to an other.
+ * We save the current device we are scanning and compare
+ * it with the current st_dev in the last stat performed on
+ * the file we are currently storing.
+ */
+ if (jcr->acl_data->current_dev != ff_pkt->statp.st_dev) {
+ /**
+ * Reset the acl save flags.
+ */
+ jcr->acl_data->flags = 0;
+
+ jcr->acl_data->flags |= BACL_FLAG_SAVE_NATIVE;
+
+ /**
+ * Save that we started scanning a new filesystem.
+ */
+ jcr->acl_data->current_dev = ff_pkt->statp.st_dev;
+ }
+
+#if defined(HAVE_ACL)
+ /**
+ * See if the BACL_FLAG_SAVE_NATIVE flag is set which lets us know if we should
+ * save native ACLs.