return write_changes(sf);
}
+#ifdef BLKDISCARD
/*
* sfdisk --discard-free <device>
*/
fdisk_unref_table(tb);
return rc;
}
+#else /* BLKDISCARD */
+static int command_discard_free(struct sfdisk *sf, int argc, char **argv)
+{
+ fdisk_warnx(sf->cxt, _("Discard unsupported on your system."));
+}
+#endif /* BLKDISCARD */
/*
* sfdisk --disk-id <device> [<str>]
return real_off ? bf->data + (real_off - bf->off + bias) : bf->data + bias;
}
+#ifdef O_DIRECT
/*
* This is blkid_probe_get_buffer with the read done as an O_DIRECT operation.
* Note that @off is offset within probing area, the probing area is defined by
}
return ret;
}
+#endif
/**
* blkid_probe_reset_buffers:
* then declare a checksum mismatch.
*/
if (!blkid_probe_verify_csum(pr, csum, le32_to_cpu(es->s_checksum))) {
+#ifdef O_DIRECT
if (blkid_probe_reset_buffers(pr))
return NULL;
csum = crc32c(~0, es, offsetof(struct ext2_super_block, s_checksum));
if (!blkid_probe_verify_csum(pr, csum, le32_to_cpu(es->s_checksum)))
return NULL;
+#else
+ return NULL;
+#endif
}
}
if (fc)
src/mountP.h
src/cache.c
src/fs.c
+ src/fs_statmount.c
src/init.c
src/iter.c
src/lock.c
src/optstr.c
src/tab.c
src/tab_diff.c
+ src/tab_listmount.c
src/tab_parse.c
src/tab_update.c
src/test.c
if LINUX
lib_mount_sources += '''
- src/fs_statmount.c
- src/tab_listmount.c
src/hooks.c
src/monitor.c
src/optlist.c
libmount/src/mountP.h \
libmount/src/cache.c \
libmount/src/fs.c \
+ libmount/src/fs_statmount.c \
libmount/src/init.c \
libmount/src/iter.c \
libmount/src/lock.c \
libmount/src/optstr.c \
libmount/src/tab.c \
libmount/src/tab_diff.c \
+ libmount/src/tab_listmount.c \
libmount/src/tab_parse.c \
libmount/src/tab_update.c \
libmount/src/test.c \
libmount/src/context.c \
libmount/src/context_mount.c \
libmount/src/context_umount.c \
- libmount/src/fs_statmount.c \
- libmount/src/tab_listmount.c \
libmount/src/hooks.c \
libmount/src/hook_mount.c \
libmount/src/hook_mount_legacy.c \