Displaying 20 results from an estimated 178 matches for "dirfd".
2015 Nov 13
4
[PATCH 1/4] extlinux: simplification
...t;%s: write failure on %s\n", program, file);
+ rv = 1;
+ } else
+ rv = 0;
+
+ close(fd);
+ free(file);
+
+ return rv;
+}
+
int ext2_fat_install_file(const char *path, int devfd, struct stat *rst)
{
- char *file, *oldfile, *c32file;
+ char *file, *oldfile;
int fd = -1, dirfd = -1;
- int r1, r2, r3;
+ int r1, r2;
r1 = asprintf(&file, "%s%sldlinux.sys",
path, path[0] && path[strlen(path) - 1] == '/' ? "" : "/");
r2 = asprintf(&oldfile, "%s%sextlinux.sys",
path, path[0] &&...
2015 Nov 18
1
[PATCH 4/4] extlinux: simplification by removing one label
...ed, 6 insertions(+), 12 deletions(-)
>
> diff --git a/extlinux/main.c b/extlinux/main.c
> index 43c1a31..8b97a71 100644
> --- a/extlinux/main.c
> +++ b/extlinux/main.c
> @@ -735,28 +735,22 @@ static int xfs_install_file(const char *path, int
> devfd, struct stat *rst)
> dirfd = open(path, O_RDONLY | 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);
>...
2015 Nov 13
0
[PATCH 4/4] extlinux: simplification by removing one label
...c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/extlinux/main.c b/extlinux/main.c
index 43c1a31..8b97a71 100644
--- a/extlinux/main.c
+++ b/extlinux/main.c
@@ -735,28 +735,22 @@ static int xfs_install_file(const char *path, int devfd, struct stat *rst)
dirfd = open(path, O_RDONLY | 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);
- dirf...
2010 Apr 16
0
[PATCH] add minimal faccessat()
...;
int unlink(const char *);
diff --git a/usr/klibc/faccessat.c b/usr/klibc/faccessat.c
new file mode 100644
index 0000000..f18cf84
--- /dev/null
+++ b/usr/klibc/faccessat.c
@@ -0,0 +1,26 @@
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+extern int __faccessat(int dirfd, const char *pathname, int mode);
+
+int faccessat(int dirfd, const char *pathname, int mode, int flags)
+{
+
+ /* ignoring AT_EACCESS subsequently */
+ if (flags & ~(AT_SYMLINK_NOFOLLOW | AT_EACCESS)) {
+ errno = EINVAL;
+ return -1;
+ }
+ if (dirfd < 0 && dirfd != AT_FDCWD) {
+...
2013 Jan 06
3
[PATCH] extlinux: Make sure ldlinux.sys file is installed
...;
---
extlinux/main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/extlinux/main.c b/extlinux/main.c
index 0204caa..f7eeeb7 100644
--- a/extlinux/main.c
+++ b/extlinux/main.c
@@ -687,6 +687,8 @@ static int xfs_install_file(const char *path, int devfd, struct stat *rst)
}
close(dirfd);
+
+ syncfs(fd);
close(fd);
return 0;
--
1.8.1
2004 Sep 11
1
[PATCH] fchdir syscall, opendir function
...0.172/klibc/include/dirent.h 2002-08-11 06:35:43.000000000 +0200
+++ ./klibc/include/dirent.h 2004-09-11 20:57:27.268620024 +0200
@@ -16,5 +16,6 @@ typedef struct _IO_dir DIR;
__extern DIR *opendir(const char *);
__extern struct dirent *readdir(DIR *);
__extern int closedir(DIR *);
+__extern int dirfd (DIR *);
#endif /* _DIRENT_H */
diff -purNx linux ../klibc-0.172/klibc/include/unistd.h ./klibc/include/unistd.h
--- ../klibc-0.172/klibc/include/unistd.h 2004-08-25 23:56:50.000000000 +0200
+++ ./klibc/include/unistd.h 2004-09-11 21:06:09.259265384 +0200
@@ -60,6 +60,7 @@ __extern int access(co...
2011 Jan 29
2
another bugfix
Hi,
number three, where I first thought it was a GCC bug but is
apparently bad code in klibc. Submitted with permission:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47533#c6
Patch attached again (sorry) not just because that is easier
with my mail system but also to keep original author intact.
bye,
//mirabilos
--
> emacs als auch vi zum Kotzen finde (joe rules) und pine f?r den einzig
>
2010 Dec 14
8
builder-ubuntu febootstrap success 85db2a664c820e01a02ddc3b33b3da26fe05dc5b
...ddc3b33b3da26fe05dc5b
+ ./autogen.sh
Module list with included dependencies (indented):
alloca-opt
arg-nonnull
bitrotate
c++defs
c-ctype
chdir-long
chown
cloexec
close
close-hook
cycle-check
d-ino
d-type
dev-ino
dirent
dirent-safer
dirfd
dirname-lgpl
double-slash-root
dup2
errno
error
exitfail
extensions
fchdir
fclose
fcntl
fcntl-h
fcntl-safer
fdopendir
filevercmp
float
fts
full-write
getcwd
getdtablesize
getopt-gnu
getopt-posix
gettext-h
hash
hash-...
2011 Jan 14
7
builder-ubuntu febootstrap success 85db2a664c820e01a02ddc3b33b3da26fe05dc5b
...ddc3b33b3da26fe05dc5b
+ ./autogen.sh
Module list with included dependencies (indented):
alloca-opt
arg-nonnull
bitrotate
c++defs
c-ctype
chdir-long
chown
cloexec
close
close-hook
cycle-check
d-ino
d-type
dev-ino
dirent
dirent-safer
dirfd
dirname-lgpl
double-slash-root
dup2
errno
error
exitfail
extensions
fchdir
fclose
fcntl
fcntl-h
fcntl-safer
fdopendir
filevercmp
float
fts
full-write
getcwd
getdtablesize
getopt-gnu
getopt-posix
gettext-h
hash
hash-...
2011 Feb 15
7
builder-ubuntu febootstrap success 85db2a664c820e01a02ddc3b33b3da26fe05dc5b
...ddc3b33b3da26fe05dc5b
+ ./autogen.sh
Module list with included dependencies (indented):
alloca-opt
arg-nonnull
bitrotate
c++defs
c-ctype
chdir-long
chown
cloexec
close
close-hook
cycle-check
d-ino
d-type
dev-ino
dirent
dirent-safer
dirfd
dirname-lgpl
double-slash-root
dup2
errno
error
exitfail
extensions
fchdir
fclose
fcntl
fcntl-h
fcntl-safer
fdopendir
filevercmp
float
fts
full-write
getcwd
getdtablesize
getopt-gnu
getopt-posix
gettext-h
hash
hash-...
2011 Jan 14
7
builder-debian febootstrap success 85db2a664c820e01a02ddc3b33b3da26fe05dc5b
...ddc3b33b3da26fe05dc5b
+ ./autogen.sh
Module list with included dependencies (indented):
alloca-opt
arg-nonnull
bitrotate
c++defs
c-ctype
chdir-long
chown
cloexec
close
close-hook
cycle-check
d-ino
d-type
dev-ino
dirent
dirent-safer
dirfd
dirname-lgpl
double-slash-root
dup2
errno
error
exitfail
extensions
fchdir
fclose
fcntl
fcntl-h
fcntl-safer
fdopendir
filevercmp
float
fts
full-write
getcwd
getdtablesize
getopt-gnu
getopt-posix
gettext-h
hash
hash-...
2011 Feb 15
7
builder-debian febootstrap success 85db2a664c820e01a02ddc3b33b3da26fe05dc5b
...ddc3b33b3da26fe05dc5b
+ ./autogen.sh
Module list with included dependencies (indented):
alloca-opt
arg-nonnull
bitrotate
c++defs
c-ctype
chdir-long
chown
cloexec
close
close-hook
cycle-check
d-ino
d-type
dev-ino
dirent
dirent-safer
dirfd
dirname-lgpl
double-slash-root
dup2
errno
error
exitfail
extensions
fchdir
fclose
fcntl
fcntl-h
fcntl-safer
fdopendir
filevercmp
float
fts
full-write
getcwd
getdtablesize
getopt-gnu
getopt-posix
gettext-h
hash
hash-...
2010 Dec 14
7
builder-debian febootstrap success 85db2a664c820e01a02ddc3b33b3da26fe05dc5b
...ddc3b33b3da26fe05dc5b
+ ./autogen.sh
Module list with included dependencies (indented):
alloca-opt
arg-nonnull
bitrotate
c++defs
c-ctype
chdir-long
chown
cloexec
close
close-hook
cycle-check
d-ino
d-type
dev-ino
dirent
dirent-safer
dirfd
dirname-lgpl
double-slash-root
dup2
errno
error
exitfail
extensions
fchdir
fclose
fcntl
fcntl-h
fcntl-safer
fdopendir
filevercmp
float
fts
full-write
getcwd
getdtablesize
getopt-gnu
getopt-posix
gettext-h
hash
hash-...
2011 May 13
3
builder-debian febootstrap success 6ab9465001dfaa52edc5992ee71f2e9aecc2085d
...5992ee71f2e9aecc2085d
+ ./autogen.sh
Module list with included dependencies (indented):
alloca-opt
arg-nonnull
bitrotate
c++defs
c-ctype
chdir-long
chown
cloexec
close
close-hook
cycle-check
d-ino
d-type
dev-ino
dirent
dirent-safer
dirfd
dirname-lgpl
double-slash-root
dup2
errno
error
exitfail
extensions
fchdir
fclose
fcntl
fcntl-h
fcntl-safer
fdopendir
filevercmp
float
fts
full-write
getcwd
getdtablesize
getopt-gnu
getopt-posix
gettext-h
hash
hash-...
2010 Dec 07
0
builder-debian febootstrap FAILED configure step af9f9305a0a48829392a57d24aee30978b449d1d
...a57d24aee30978b449d1d
+ ./autogen.sh
Module list with included dependencies (indented):
alloca-opt
arg-nonnull
bitrotate
c++defs
c-ctype
chdir-long
chown
cloexec
close
close-hook
cycle-check
d-ino
d-type
dev-ino
dirent
dirent-safer
dirfd
dirname-lgpl
double-slash-root
dup2
errno
error
exitfail
extensions
fchdir
fclose
fcntl
fcntl-h
fcntl-safer
fdopendir
filevercmp
float
fts
full-write
getcwd
getdtablesize
getopt-gnu
getopt-posix
gettext-h
hash
hash-...
2011 Mar 22
1
builder-debian febootstrap success 6720ad28eddbcd671032c151f7219a35ba615b1b
...2c151f7219a35ba615b1b
+ ./autogen.sh
Module list with included dependencies (indented):
alloca-opt
arg-nonnull
bitrotate
c++defs
c-ctype
chdir-long
chown
cloexec
close
close-hook
cycle-check
d-ino
d-type
dev-ino
dirent
dirent-safer
dirfd
dirname-lgpl
double-slash-root
dup2
errno
error
exitfail
extensions
fchdir
fclose
fcntl
fcntl-h
fcntl-safer
fdopendir
filevercmp
float
fts
full-write
getcwd
getdtablesize
getopt-gnu
getopt-posix
gettext-h
hash
hash-...
2008 Nov 21
2
[PATCH] drop root privileges on solaris, request for testing
...Wed Nov 19 14:31:56 2008 +0000
@@ -461,7 +461,8 @@ AC_CHECK_FUNCS(fcntl flock lockf inet_at
setrlimit setproctitle seteuid setreuid setegid setresgid \
strtoull strtoll strtouq strtoq \
setpriority quotactl getmntent kqueue kevent backtrace_symbols \
- walkcontext dirfd clearenv malloc_usable_size clock_gettime)
+ walkcontext dirfd clearenv malloc_usable_size clock_gettime \
+ setppriv)
dnl strtoimax and strtoumax are macros in HP-UX, so inttypes.h must be included
AC_MSG_CHECKING([for strtoimax])
diff -r 8f41c9f3f392 src/master/Makefile.am
--- a...
2010 Dec 07
0
builder-ubuntu febootstrap success 2dfc659c33c5ceb298e8027e219547416b286661
...8027e219547416b286661
+ ./autogen.sh
Module list with included dependencies (indented):
alloca-opt
arg-nonnull
bitrotate
c++defs
c-ctype
chdir-long
chown
cloexec
close
close-hook
cycle-check
d-ino
d-type
dev-ino
dirent
dirent-safer
dirfd
dirname-lgpl
double-slash-root
dup2
errno
error
exitfail
extensions
fchdir
fclose
fcntl
fcntl-h
fcntl-safer
fdopendir
filevercmp
float
fts
full-write
getcwd
getdtablesize
getopt-gnu
getopt-posix
gettext-h
hash
hash-...
2010 Dec 10
0
builder-ubuntu febootstrap success 27a911ca193ad5a56a7afac4f6100b3a3f732680
...afac4f6100b3a3f732680
+ ./autogen.sh
Module list with included dependencies (indented):
alloca-opt
arg-nonnull
bitrotate
c++defs
c-ctype
chdir-long
chown
cloexec
close
close-hook
cycle-check
d-ino
d-type
dev-ino
dirent
dirent-safer
dirfd
dirname-lgpl
double-slash-root
dup2
errno
error
exitfail
extensions
fchdir
fclose
fcntl
fcntl-h
fcntl-safer
fdopendir
filevercmp
float
fts
full-write
getcwd
getdtablesize
getopt-gnu
getopt-posix
gettext-h
hash
hash-...
2010 Dec 07
0
builder-debian febootstrap success af9f9305a0a48829392a57d24aee30978b449d1d
...a57d24aee30978b449d1d
+ ./autogen.sh
Module list with included dependencies (indented):
alloca-opt
arg-nonnull
bitrotate
c++defs
c-ctype
chdir-long
chown
cloexec
close
close-hook
cycle-check
d-ino
d-type
dev-ino
dirent
dirent-safer
dirfd
dirname-lgpl
double-slash-root
dup2
errno
error
exitfail
extensions
fchdir
fclose
fcntl
fcntl-h
fcntl-safer
fdopendir
filevercmp
float
fts
full-write
getcwd
getdtablesize
getopt-gnu
getopt-posix
gettext-h
hash
hash-...