diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-05-05 23:25:32 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-05-05 23:25:32 +0200 |
commit | b6fe0d45cf69841f631b0e3991c6a0a7d9b4c9df (patch) | |
tree | 177373d00e8ed32fc23dc25ba2b1632b859e8496 | |
parent | 19f1b044cd7fa9521be2dfba6bd74d07328ebb2b (diff) |
SYMLOOP_MAX may be undefined under some build flags
* libdiskfs/boot-start.c (diskfs_start_bootstrap): Use value returned by
sysconf (_SC_SYMLOOP_MAX) instead of SYMLOOP_MAX.
-rw-r--r-- | libdiskfs/boot-start.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libdiskfs/boot-start.c b/libdiskfs/boot-start.c index 1e4a1c64..b62d5f30 100644 --- a/libdiskfs/boot-start.c +++ b/libdiskfs/boot-start.c @@ -237,7 +237,8 @@ diskfs_start_bootstrap () } else if (retry == FS_RETRY_MAGICAL && pathbuf[0] == '/') { - assert (init_lookups < SYMLOOP_MAX); + assert (sysconf (_SC_SYMLOOP_MAX) < 0 || + init_lookups < sysconf (_SC_SYMLOOP_MAX)); /* INITNAME is a symlink with an absolute target, so try again. */ initname = strdupa (pathbuf); |