2
* Copyright (C) 2002-2007 Novell/SUSE
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License as
6
* published by the Free Software Foundation, version 2 of the
18
int main(int argc, char *argv[])
24
fprintf(stderr, "usage: %s dir\n",
29
dirfd = open(dir, O_RDONLY | O_DIRECTORY);
31
fprintf(stderr, "FAIL: open %s failed - %s\n",
32
dir, strerror(errno));
36
if (fchdir(dirfd) == 0) {
39
printf("FAIL - %s\n", strerror(errno));