From 5ad97d9ef3f77a246a588f4256d92f831e542f5d Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Tue, 26 Jan 2016 22:25:03 +0200 Subject: str: Add str2mac helper function Add function to convert a string in the format xx:xx:xx:xx:xx:xx to a MAC address byte array. Signed-off-by: Vadim Kochan [tk: Add len parameter and error out on too short buffers] Signed-off-by: Tobias Klauser --- str.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'str.h') diff --git a/str.h b/str.h index 3ffb2b9..7879af6 100644 --- a/str.h +++ b/str.h @@ -1,6 +1,8 @@ #ifndef STR_H #define STR_H +#include + #include "built_in.h" extern size_t strlcpy(char *dest, const char *src, size_t size); @@ -11,5 +13,6 @@ extern noinline void *xmemset(void *s, int c, size_t n); extern char *argv2str(int startind, int argc, char **argv); extern char **argv_insert(char **argv, size_t *count, const char *str); extern void argv_free(char **argv); +extern int str2mac(const char *str, uint8_t *mac, size_t len); #endif /* STR_H */ -- cgit v1.2.3-54-g00ecf ge='this.form.submit();'> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-06 13:27:19 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-06 13:27:19 -0700
commit81c20b96e51660762f7d0df58b5faa370d47e3fd (patch)
tree1da1598ec918005ef657fba0634b5ce9aec78b72 /arch/tile/kernel
parent089eed29b4021f8b68ec3d1746a1f9b9c4f04783 (diff)
parent158d6742bced08c87fd46b5905eebc0d41e3cdf6 (diff)
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus: MIPS: Octeon: Place cnmips_cu2_setup in __init memory. MIPS: Don't place cu2 notifiers in __cpuinitdata MIPS: Calculate VMLINUZ_LOAD_ADDRESS based on the length of vmlinux.bin MIPS: Alchemy: Resolve prom section mismatches MIPS: Fix syscall 64 bit number comments. MIPS: Hookup fanotify_init, fanotify_mark, and prlimit64 syscalls. MIPS: TX49xx: Rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN MIPS: N32: Fix getdents64 syscall for n32 MIPS: Remove pr_<level> uses of KERN_<level> MIPS: PNX8550: Sort out machine halt, restart and powerdown functions. MIPS: GIC: Remove dependencies from Malta files. MIPS: Kconfig: Fix and clarify kconfig help text for VSMP and SMTC. MIPS: DMA: Fix computation of DMA flags from device's coherent_dma_mask. MIPS: Audit: Fix hang in entry.S. MIPS: Document why RELOC_HIDE is there. MIPS: Octeon: Determine if helper needs to be built MIPS: Use generic atomic64 for 32-bit kernels MIPS: RM7000: Symbol should be static MIPS: kspd: Adjust confusing if indentation MIPS: Fix a typo.
Diffstat (limited to 'arch/tile/kernel')