6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek Jakub Hrozek <jhrozek@redhat.com>
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek Copyright (C) 2012 Red Hat
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek This program is free software; you can redistribute it and/or modify
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek it under the terms of the GNU Lesser General Public License as published by
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek the Free Software Foundation; either version 3 of the License, or
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek (at your option) any later version.
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek This program is distributed in the hope that it will be useful,
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek but WITHOUT ANY WARRANTY; without even the implied warranty of
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek GNU Lesser General Public License for more details.
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek You should have received a copy of the GNU Lesser General Public License
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek along with this program. If not, see <http://www.gnu.org/licenses/>.
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek#include "sss_client/autofs/sss_autofs_private.h"
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek { "by-name", 'n', POPT_ARG_STRING, &pc_key, 0, "Request map by name", NULL },
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek pc = poptGetContext(NULL, argc, argv, long_options, 0);
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek fprintf(stderr, "Please specify the automounter map name\n");
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek fprintf(stderr, "setautomntent failed [%d]: %s\n",
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek printf("setautomntent done for %s\n", mapname);
612231a05770a79b8ff53f91d85f5be7595ed785Jakub Hrozek "getautomntent returned success but no data?\n");
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek } while(ret == 0);
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek fprintf(stderr, "getautomntent_r failed [%d]: %s\n",
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek ret = _sss_getautomntbyname_r(pc_key, &value, ctx);
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek } else if (ret != 0) {
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek fprintf(stderr, "getautomntent_r failed [%d]: %s\n",
612231a05770a79b8ff53f91d85f5be7595ed785Jakub Hrozek "returned success but no data?\n");
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek printf("key: %s\t\tvalue: %s\n", pc_key, value);
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek fprintf(stderr, "endautomntent failed [%d]: %s\n",
6e8238868a4d17030bb4f01494961d0354a953bfJakub Hrozek printf("endautomntent done for %s\n", mapname);