Created
June 2, 2013 06:28
-
-
Save anonymous/5692818 to your computer and use it in GitHub Desktop.
stdin
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
int check_is_linkfile(inode_t *i, struct iatt *s, dict_t *x) | |
{ | |
mode_t m = st_mode_from_ia ((s)->ia_prot, (s)->ia_type) & ~S_IFMT; | |
char *buffer; | |
int foo = inode_path(i, NULL, &buffer); | |
fprintf(stderr, "looking up linked-ness for '%s'\n", buffer); | |
if (m != DHT_LINKFILE_MODE) { | |
fprintf(stderr, "mode doesn't match: %o\n", m); | |
return 0; | |
} | |
if (! dict_get (x, DHT_LINKFILE_KEY)) { | |
fprintf(stderr, "key says it isn't a linkfile\n"); | |
return 0; | |
} | |
return 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment