2 * $Id: ad_size.c,v 1.8 2010-02-26 14:13:16 didg Exp $
4 * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
5 * All rights reserved. See COPYRIGHT.
7 * if we could depend upon inline functions, this would be one.
12 #endif /* HAVE_CONFIG_H */
15 #include <atalk/logger.h>
16 #include <atalk/adouble.h>
18 off_t ad_size(const struct adouble *ad, const u_int32_t eid)
20 if (eid == ADEID_DFORK) {
23 if (ad->ad_data_fork.adf_syml)
24 return strlen(ad->ad_data_fork.adf_syml);
26 if (fstat(ad_data_fileno(ad), &st) < 0)
31 return ad_getentrylen(ad, eid);