2 * Copyright (c) 2000-2001 Silicon Graphics, Inc.
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 /* Given a file object's pathname, print the filesystem handle. */
25 /*---------------------------------------------------------------------------
27 Test program used to test dm_path_to_fshandle(). The command line is:
29 path_to_fshandle pathname
31 where pathname is the name of a file, directory, or symlink.
33 ----------------------------------------------------------------------------*/
42 fprintf(stderr, "usage:\t%s pathname\n", Progname);
58 if (Progname = strrchr(argv[0], '/')) {
68 (void)dm_init_service(&name);
70 if (dm_path_to_fshandle(pathname, &fshanp, &fshlen) != 0) {
71 fprintf(stderr, "dm_path_to_fshandle failed, %s\n",
75 hantoa(fshanp, fshlen, buffer);
76 fprintf(stdout, "%s\n", buffer);
78 dm_handle_free(fshanp, fshlen);