/***********************************************************************1* *2* This software is part of the ast package *3* Copyright (c) 1989-2012 AT&T Intellectual Property *4* and is licensed under the *5* Eclipse Public License, Version 1.0 *6* by AT&T Intellectual Property *7* *8* A copy of the License is available at *9* http://www.eclipse.org/org/documents/epl-v10.html *10* (with md5 checksum b35adb5213ca9657e911e9befb180842) *11* *12* Information and Software Systems Research *13* AT&T Research *14* Florham Park NJ *15* *16* Glenn Fowler <[email protected]> *17* David Korn <[email protected]> *18* Eduardo Krell <[email protected]> *19* *20***********************************************************************/21#pragma prototyped2223#include "3d.h"2425#ifdef getdents3d2627ssize_t28getdents3d(int fd, void* buf, size_t n)29{30ssize_t r;3132#if FS33register Mount_t* mp;3435if (!fscall(NiL, MSG_getdents, 0, fd, buf, n))36return(state.ret);37mp = monitored();38#endif39if ((r = GETDENTS(fd, buf, n)) >= 0)40{41#if FS42if (mp)43fscall(mp, MSG_getdents, r, fd, buf, n);44for (mp = state.global; mp; mp = mp->global)45if (fssys(mp, MSG_getdents))46fscall(mp, MSG_getdents, r, fd, buf, n);47#endif48}49return(r);50}5152#else5354NoN(getdents)5556#endif5758#ifdef getdents643d5960ssize_t61getdents643d(int fd, void* buf, size_t n)62{63ssize_t r;6465#if FS66register Mount_t* mp;6768if (!fscall(NiL, MSG_getdents, 0, fd, buf, n))69return(state.ret);70mp = monitored();71#endif72if ((r = GETDENTS64(fd, buf, n)) >= 0)73{74#if FS75if (mp)76fscall(mp, MSG_getdents, r, fd, buf, n);77for (mp = state.global; mp; mp = mp->global)78if (fssys(mp, MSG_getdents))79fscall(mp, MSG_getdents, r, fd, buf, n);80#endif81}82return(r);83}8485#else8687NoN(getdents64)8889#endif909192