Changeset 97c7682 in mainline for uspace/lib/posix/getopt.c
- Timestamp:
- 2012-07-14T11:18:40Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 804d9b6
- Parents:
- 0747468 (diff), f0348c8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/getopt.c
r0747468 r97c7682 1 1 /* 2 * Copyright (c) 20 09 Lukas Mejdrech2 * Copyright (c) 2012 Vojtech Horky 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup lib net29 /** @addtogroup libposix 30 30 * @{ 31 31 */ 32 /** @file Command line argument parsing. 33 */ 34 #define LIBPOSIX_INTERNAL 32 35 33 /** @file 34 * Network interface layer interface implementation for remote modules. 35 * @see nil_remote.h 36 */ 36 #include "internal/common.h" 37 #include "libc/getopt.h" 38 #include "getopt.h" 37 39 38 #include <ipc/loc.h>39 #include <nil_remote.h>40 #include <generic.h>41 #include <net/device.h>42 #include <net/packet.h>43 #include <packet_client.h>44 #include <ipc/nil.h>45 40 46 int nil_device_req(async_sess_t *sess, nic_device_id_t device_id,47 service_id_t sid, size_t mtu)41 int posix_getopt_long(int argc, char * const argv[], 42 const char *opt_string, const struct option *long_opts, int *long_index) 48 43 { 49 async_exch_t *exch = async_exchange_begin(sess); 50 int rc = async_req_3_0(exch, NET_NIL_DEVICE, (sysarg_t) device_id, 51 (sysarg_t) sid, (sysarg_t) mtu); 52 async_exchange_end(exch); 44 int rc = getopt_long(argc, argv, opt_string, long_opts, long_index); 45 posix_optarg = (char *) optarg; 53 46 return rc; 54 47 } 55 48 56 /** @} 57 */ 49 int posix_getopt(int argc, char * const argv[], const char *opt_string) 50 { 51 int rc = getopt(argc, argv, opt_string); 52 posix_optarg = (char *) optarg; 53 return rc; 54 }
Note:
See TracChangeset
for help on using the changeset viewer.