forked from openSUSE/obs-build
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- avoid double registrations for same architecure
- Loading branch information
1 parent
2c6ec1f
commit 3a76162
Showing
1 changed file
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
* | ||
* AUTHOR | ||
* James Perkins <[email protected]> | ||
* Adrian Schroeter <[email protected]> | ||
*/ | ||
|
||
#include <sys/mount.h> | ||
|
@@ -210,7 +211,24 @@ enum okfail binfmt_register(char *datafile, char *regfile) | |
continue; | ||
} | ||
|
||
int ret=access(f[interpreter], X_OK); | ||
int ret; | ||
/* Is an interpreter for this arch already registered? */ | ||
snprintf(path, sizeof(path), SYSFS_BINFMT_MISC "/%s", f[name]); | ||
ret=access(path, X_OK); | ||
fprintf(stderr, | ||
"interpreter for '%s' is %d\n", | ||
f[name], ret); | ||
if (ret == 0) { | ||
#ifdef DEBUG | ||
fprintf(stderr, | ||
"interpreter for '%s' already registered, ignoring\n", | ||
f[name]); | ||
#endif /* DEBUG */ | ||
continue; | ||
} | ||
|
||
/* Does the interpreter exists? */ | ||
ret=access(f[interpreter], X_OK); | ||
if (ret != 0) { | ||
#ifdef DEBUG | ||
fprintf(stderr, | ||
|