chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
treewide: another round of simplifications
[elogind.git]
/
src
/
fstab-generator
/
fstab-generator.c
diff --git
a/src/fstab-generator/fstab-generator.c
b/src/fstab-generator/fstab-generator.c
index 1c85a729b82093392dbf85608b704de24a558488..e8a21f7fff75078fb2d848deb30172493fc50c59 100644
(file)
--- a/
src/fstab-generator/fstab-generator.c
+++ b/
src/fstab-generator/fstab-generator.c
@@
-148,10
+148,8
@@
static int add_swap(
return log_oom();
mkdir_parents_label(lnk, 0755);
return log_oom();
mkdir_parents_label(lnk, 0755);
- if (symlink(unit, lnk) < 0) {
- log_error_errno(errno, "Failed to create symlink %s: %m", lnk);
- return -errno;
- }
+ if (symlink(unit, lnk) < 0)
+ return log_error_errno(errno, "Failed to create symlink %s: %m", lnk);
}
return 0;
}
return 0;
@@
-268,10
+266,8
@@
static int add_mount(
fprintf(f, "Options=%s\n", filtered);
fflush(f);
fprintf(f, "Options=%s\n", filtered);
fflush(f);
- if (ferror(f)) {
- log_error_errno(errno, "Failed to write unit file %s: %m", unit);
- return -errno;
- }
+ if (ferror(f))
+ return log_error_errno(errno, "Failed to write unit file %s: %m", unit);
if (!noauto && post) {
lnk = strjoin(arg_dest, "/", post, nofail || automount ? ".wants/" : ".requires/", name, NULL);
if (!noauto && post) {
lnk = strjoin(arg_dest, "/", post, nofail || automount ? ".wants/" : ".requires/", name, NULL);
@@
-279,10
+275,8
@@
static int add_mount(
return log_oom();
mkdir_parents_label(lnk, 0755);
return log_oom();
mkdir_parents_label(lnk, 0755);
- if (symlink(unit, lnk) < 0) {
- log_error_errno(errno, "Failed to create symlink %s: %m", lnk);
- return -errno;
- }
+ if (symlink(unit, lnk) < 0)
+ return log_error_errno(errno, "Failed to create symlink %s: %m", lnk);
}
if (automount) {
}
if (automount) {
@@
-296,10
+290,8
@@
static int add_mount(
fclose(f);
f = fopen(automount_unit, "wxe");
fclose(f);
f = fopen(automount_unit, "wxe");
- if (!f) {
- log_error_errno(errno, "Failed to create unit file %s: %m", automount_unit);
- return -errno;
- }
+ if (!f)
+ return log_error_errno(errno, "Failed to create unit file %s: %m", automount_unit);
fprintf(f,
"# Automatically generated by systemd-fstab-generator\n\n"
fprintf(f,
"# Automatically generated by systemd-fstab-generator\n\n"
@@
-319,10
+311,8
@@
static int add_mount(
where);
fflush(f);
where);
fflush(f);
- if (ferror(f)) {
- log_error_errno(errno, "Failed to write unit file %s: %m", automount_unit);
- return -errno;
- }
+ if (ferror(f))
+ return log_error_errno(errno, "Failed to write unit file %s: %m", automount_unit);
free(lnk);
lnk = strjoin(arg_dest, "/", post, nofail ? ".wants/" : ".requires/", automount_name, NULL);
free(lnk);
lnk = strjoin(arg_dest, "/", post, nofail ? ".wants/" : ".requires/", automount_name, NULL);
@@
-330,10
+320,8
@@
static int add_mount(
return log_oom();
mkdir_parents_label(lnk, 0755);
return log_oom();
mkdir_parents_label(lnk, 0755);
- if (symlink(automount_unit, lnk) < 0) {
- log_error_errno(errno, "Failed to create symlink %s: %m", lnk);
- return -errno;
- }
+ if (symlink(automount_unit, lnk) < 0)
+ return log_error_errno(errno, "Failed to create symlink %s: %m", lnk);
}
return 0;
}
return 0;