]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fsfreeze: remove unnecessary functions
authorSami Kerola <kerolasa@iki.fi>
Sun, 18 Dec 2016 18:32:40 +0000 (18:32 +0000)
committerKarel Zak <kzak@redhat.com>
Thu, 22 Dec 2016 11:18:45 +0000 (12:18 +0100)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
sys-utils/fsfreeze.c

index 727319a6688f06f805ee17946538e7f368b77dba..a25eaff209651ab6b1046dfff967604d8880ddc5 100644 (file)
@@ -33,16 +33,6 @@ enum fs_operation {
        UNFREEZE
 };
 
-static int freeze_f(int fd)
-{
-       return ioctl(fd, FIFREEZE, 0);
-}
-
-static int unfreeze_f(int fd)
-{
-       return ioctl(fd, FITHAW, 0);
-}
-
 static void __attribute__((__noreturn__)) usage(FILE *out)
 {
        fprintf(out, USAGE_HEADER);
@@ -138,13 +128,13 @@ int main(int argc, char **argv)
 
        switch (action) {
        case FREEZE:
-               if (freeze_f(fd)) {
+               if (ioctl(fd, FIFREEZE, 0)) {
                        warn(_("%s: freeze failed"), path);
                        goto done;
                }
                break;
        case UNFREEZE:
-               if (unfreeze_f(fd)) {
+               if (ioctl(fd, FITHAW, 0)) {
                        warn(_("%s: unfreeze failed"), path);
                        goto done;
                }