diff options
Diffstat (limited to 'lib/libautofs/libautofs.c')
-rw-r--r-- | lib/libautofs/libautofs.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/libautofs/libautofs.c b/lib/libautofs/libautofs.c index a47535a..459b32d 100644 --- a/lib/libautofs/libautofs.c +++ b/lib/libautofs/libautofs.c @@ -206,10 +206,13 @@ err: void autoh_freeall(autoh_t *ah) { + autoh_t *ahp; - while (*ah != NULL) { - autoh_free(*ah); - ah++; + ahp = ah; + + while (*ahp != NULL) { + autoh_free(*ahp); + ahp++; } safe_free(ah); } @@ -396,6 +399,13 @@ autoreq_getoffset(autoreq_t req, off_t *offp) *offp = req->au_offset - AUTOFS_USEROFF; } +void +autoreq_getxid(autoreq_t req, int *xid) +{ + + *xid = req->au_xid; +} + /* toggle by path. args = handle, AUTO_?, pid (-1 to disable), path. */ int autoh_togglepath(autoh_t ah, int op, pid_t pid, const char *path) |