chiark / gitweb /
readahead: properly initialize variable
[elogind.git] / src / readahead-collect.c
index aa136ce50ec82e3ba6a84aa360d74532bf876bf9..50c1a0b6844b835d816a2d5f52da0ee69d16d48d 100644 (file)
@@ -54,7 +54,6 @@
  *
  * - detect ssd on btrfs/lvm...
  * - read ahead directories
- * - sd_readahead_cancel
  * - gzip?
  * - remount rw?
  * - handle files where nothing is in mincore
@@ -201,7 +200,7 @@ static int qsort_compare(const void *a, const void *b) {
 
 static int collect(const char *root) {
         enum {
-                FD_FANOTIFY,  /* Get the actualy fs events */
+                FD_FANOTIFY,  /* Get the actual fs events */
                 FD_SIGNAL,
                 FD_INOTIFY,   /* We get notifications to quit early via this fd */
                 _FD_MAX
@@ -419,7 +418,7 @@ done:
 
         log_debug("Writing Pack File...");
 
-        on_ssd = fs_on_ssd(root);
+        on_ssd = fs_on_ssd(root) == 0;
         log_debug("On SSD: %s", yes_no(on_ssd));
 
         on_btrfs = statfs(root, &sfs) >= 0 && sfs.f_type == BTRFS_SUPER_MAGIC;