Changeset 97c7682 in mainline for uspace/lib/posix/getopt.c


Ignore:
Timestamp:
2012-07-14T11:18:40Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
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.
Message:

Merge mainline changes.

Text conflict in boot/arch/arm32/Makefile.inc:

Trivial conflict around ifeq condition.

Text conflict in kernel/arch/arm32/include/mm/page.h:

Added defines and set_pt_levelx_present function.
COnflict looked horrible because of the armv4/v7 split.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/getopt.c

    r0747468 r97c7682  
    11/*
    2  * Copyright (c) 2009 Lukas Mejdrech
     2 * Copyright (c) 2012 Vojtech Horky
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup libnet
     29/** @addtogroup libposix
    3030 * @{
    3131 */
     32/** @file Command line argument parsing.
     33 */
     34#define LIBPOSIX_INTERNAL
    3235
    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"
    3739
    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>
    4540
    46 int nil_device_req(async_sess_t *sess, nic_device_id_t device_id,
    47     service_id_t sid, size_t mtu)
     41int posix_getopt_long(int argc, char * const argv[],
     42    const char *opt_string, const struct option *long_opts, int *long_index)
    4843{
    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;
    5346        return rc;
    5447}
    5548
    56 /** @}
    57  */
     49int 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.