yfs_client.cc
bool
yfs_client::issymlink(inum inum) {
    extent_protocol::attr a;

    if (ec->getattr(inum, a) != extent_protocol::OK) {
        printf("error getting attr\n");
        return false;
    }

    if (a.type == extent_protocol::T_SYMLINK) {
        printf("issymlink: %lld is a symlink\n", inum);
        return true;
    }

    printf("issymlink: %lld is not a symlink\n", inum);
    return false;
}
/** Your code here for Lab...
 * You may need to add routines such as
 * readlink, issymlink here to implement symbolic link.
 * 
 * */
Your code here for Lab
You may need to add routines such as
readlink, issymlink here to implement symbolic link.
Your code here for Lab You may need to add routines such as readlink issymlink here to implement symbolic link .
bool
yfs_client::issymlink(inum inum) {
    extent_protocol::attr a;
    if (ec->getattr(inum, a) != extent_protocol::OK) {
        printf("error getting attr\n");
        return false;
    }
    if (a.type == extent_protocol::T_SYMLINK) {
        printf("issymlink: %lld is a symlink\n", inum);
        return true;
    }
    printf("issymlink: %lld is not a symlink\n", inum);
    return false;
}
bool yfs_client :: issymlink ( inum inum ) { extent_protocol :: attr a ; if ( ec -> getattr ( inum , a ) != extent_protocol :: OK ) { printf ( " \n " ) ; return false ; } if ( a . type == extent_protocol :: T_SYMLINK ) { printf ( " \n " , inum ) ; return true ; } printf ( " \n " , inum ) ; return false ; }
Your code here for Lab...
 You may need to add routines such as
 readlink, issymlink here to implement symbolic link.
Your code here for Lab ... You may need to add routines such as readlink issymlink here to implement symbolic link .