getshare
int getshare(FILE *, share_t **);
while ((res = getshare(f, &sh)) > 0) {
while (getshare(fp, &sharetab_entry) > 0) {