Displaying 4 results from an estimated 4 matches for "ext_install_ldlinux_c32".
2015 Nov 13
4
[PATCH 1/4] extlinux: simplification
Merge installation of ldlinux.c32 from ext2_fat_install_file,
btrfs_install_file and xfs_install_file into one function
ext_install_ldlinux_c32
Signed-off-by: Nicolas Cornu <nicolac76 at yahoo.fr>
---
extlinux/main.c | 106 +++++++++++++++++++++-----------------------------------
1 file changed, 40 insertions(+), 66 deletions(-)
diff --git a/extlinux/main.c b/extlinux/main.c
index a2a396a..5bab712 100644
--- a/extlinux/main.c
+++...
2015 Nov 18
1
[PATCH 4/4] extlinux: simplification by removing one label
...ail;
> + return 1;
> }
>
> - if (ext_install_ldlinux_sys(devfd, path, rst))
> - goto bail;
> + if (ext_install_ldlinux_sys(devfd, path, rst)) {
> + close(dirfd);
> + return 1;
> + }
>
> close(dirfd);
>
> - dirfd = -1;
> -
> if (ext_install_ldlinux_c32(path))
> - goto bail;
> + return 1;
>
> sync();
>
> return 0;
> -
> -bail:
> - if (dirfd >= 0)
> - close(dirfd);
> -
> - return 1;
> }
>
> /*
> --
> 2.6.2
I would just note that gotos are often used in C (at least in Linux)
as...
2015 Nov 13
0
[PATCH 2/4] extlinux: rename ext2_fat_install_file
...nd ufs.
Signed-off-by: Nicolas Cornu <nicolac76 at yahoo.fr>
---
extlinux/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/extlinux/main.c b/extlinux/main.c
index 5bab712..c446c75 100644
--- a/extlinux/main.c
+++ b/extlinux/main.c
@@ -595,7 +595,7 @@ static int ext_install_ldlinux_c32(const char *path)
return rv;
}
-int ext2_fat_install_file(const char *path, int devfd, struct stat *rst)
+int ext_common_install_file(const char *path, int devfd, struct stat *rst)
{
char *file, *oldfile;
int fd = -1, dirfd = -1;
@@ -1007,7 +1007,7 @@ static int install_file(cons...
2015 Nov 13
0
[PATCH 4/4] extlinux: simplification by removing one label
...NLY | O_DIRECTORY);
if (dirfd < 0) {
perror(path);
- goto bail;
+ return 1;
}
- if (ext_install_ldlinux_sys(devfd, path, rst))
- goto bail;
+ if (ext_install_ldlinux_sys(devfd, path, rst)) {
+ close(dirfd);
+ return 1;
+ }
close(dirfd);
- dirfd = -1;
-
if (ext_install_ldlinux_c32(path))
- goto bail;
+ return 1;
sync();
return 0;
-
-bail:
- if (dirfd >= 0)
- close(dirfd);
-
- return 1;
}
/*
--
2.6.2