-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR-URL: #32132 Reviewed-By: David Carlier <[email protected]> Reviewed-By: Richard Lau <[email protected]>
- Loading branch information
1 parent
1e70542
commit 3f0d002
Showing
3 changed files
with
18 additions
and
0 deletions.
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <assert.h> | ||
#include <unistd.h> | ||
#include <sys/stat.h> | ||
|
||
#define OLD "/sandbox/input.txt" | ||
#define NEW "/tmp/output.txt" | ||
|
||
int main() { | ||
struct stat st_old; | ||
struct stat st_new; | ||
|
||
assert(0 == stat(OLD, &st_old)); | ||
assert(0 == link(OLD, NEW)); | ||
assert(0 == stat(NEW, &st_new)); | ||
assert(st_old.st_ino == st_new.st_ino); | ||
return 0; | ||
} |
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
Binary file not shown.