003 File Manager
Current Path:
/usr/src/lib/libnetbsd
usr
/
src
/
lib
/
libnetbsd
/
📁
..
📄
Makefile
(188 B)
📄
Makefile.depend
(221 B)
📄
README
(289 B)
📄
efun.c
(3.86 KB)
📄
glob.h
(1.49 KB)
📁
netinet
📄
pthread.h
(1.46 KB)
📄
rmd160.h
(1.86 KB)
📄
sha1.h
(1.84 KB)
📄
sha2.h
(1.72 KB)
📄
sockaddr_snprintf.c
(7.85 KB)
📄
stdlib.h
(3.41 KB)
📄
strsuftoll.c
(6.67 KB)
📁
sys
📄
util.c
(2.01 KB)
📄
util.h
(2.52 KB)
Editing: util.c
/*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 SRI International * All rights reserved. * * This software was developed by SRI International and the University of * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) * ("CTSRD"), as part of the DARPA CRASH research programme. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #include <sys/cdefs.h> #include <sys/types.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "util.h" char * flags_to_string(u_long flags, const char *def) { char *str; str = fflagstostr(flags); if (*str == '\0') { free(str); str = strdup(def); } return (str); } int string_to_flags(char **stringp, u_long *setp, u_long *clrp) { return strtofflags(stringp, setp, clrp); }
Upload File
Create Folder