]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
cryptsetup-generator: drop unused fstat()
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 24 Sep 2020 08:45:25 +0000 (10:45 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 24 Sep 2020 14:36:51 +0000 (16:36 +0200)
The result stopped being used in 71e4e1258436e7e81d772aed52a02bb5d9c87cb8.

src/cryptsetup/cryptsetup-generator.c

index dec4d2018144200eaebe415c5e7155151617ecf9..43b4b2efc6a616846b9a9a7ef4683fc51e2ebb03 100644 (file)
@@ -621,7 +621,6 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat
 static int add_crypttab_devices(void) {
         _cleanup_fclose_ FILE *f = NULL;
         unsigned crypttab_line = 0;
-        struct stat st;
         int r;
 
         if (!arg_read_crypttab)
@@ -634,11 +633,6 @@ static int add_crypttab_devices(void) {
                 return 0;
         }
 
-        if (fstat(fileno(f), &st) < 0) {
-                log_error_errno(errno, "Failed to stat %s: %m", arg_crypttab);
-                return 0;
-        }
-
         for (;;) {
                 _cleanup_free_ char *line = NULL, *name = NULL, *device = NULL, *keyspec = NULL, *options = NULL, *keyfile = NULL, *keydev = NULL;
                 crypto_device *d = NULL;