/***********************************************************************1* *2* This software is part of the ast package *3* Copyright (c) 1990-2011 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* *18***********************************************************************/19#include "mnt_imount.h"2021#define USAGE "rm file ... # remove cached files"2223int im_touch_help(s)24char* s;25{26printf("\t%s\n", USAGE);27return (0);28}2930int im_touch(argc, argv)31int argc;32register char** argv;33{34register int n;35register char* s;36int fd;3738error_info.id = argv[0];39opt_info.index = 1;40while (n = optget(argv, "s:[server] "))41switch (n)42{43case 's':44s = opt_info.arg;45if ((fd = csopen(s, CS_OPEN_READ)) < 0)46{47printf("cannot connect cs server %s\n", s);48return (-1);49}50istate.cs_svc = strdup(s);51istate.fd = fd;52break;53case '?':54case ':':55printf(USAGE);56return (1);57}5859argc -= opt_info.index;60argv += opt_info.index;6162while(argc > 0)63{64s = *argv;65unlink(s);66argc--;67argv++;68}69return (0);70}7172737475