dryang / rpms / systemd

Forked from rpms/systemd a year ago
Clone
923a60
From 7d6f53ece9b0a397ee2f8bdaa1a52ef2f03bd81f Mon Sep 17 00:00:00 2001
923a60
From: Michal Sekletar <msekleta@redhat.com>
923a60
Date: Tue, 9 Aug 2016 13:02:37 +0200
923a60
Subject: [PATCH] install: do not crash when processing empty (masked) unit
923a60
 file
923a60
923a60
Related: #1159308
923a60
---
923a60
 src/shared/install.c | 2 +-
923a60
 1 file changed, 1 insertion(+), 1 deletion(-)
923a60
923a60
diff --git a/src/shared/install.c b/src/shared/install.c
923a60
index f190dbfab2..f7f9866f4d 100644
923a60
--- a/src/shared/install.c
923a60
+++ b/src/shared/install.c
923a60
@@ -996,7 +996,7 @@ static int unit_file_load(
923a60
         if (fstat(fd, &st) < 0)
923a60
                 return -errno;
923a60
         if (null_or_empty(&st)) {
923a60
-               info->type = UNIT_FILE_MASKED;
923a60
+               info->type = UNIT_FILE_TYPE_MASKED;
923a60
                 return 0;
923a60
         }
923a60
         if (S_ISDIR(st.st_mode))