Root/drivers/staging/csr/csr_formatted_io.c

1/*****************************************************************************
2
3            (c) Cambridge Silicon Radio Limited 2010
4            All rights reserved and confidential information of CSR
5
6            Refer to LICENSE.txt included with this source for details
7            on the license terms.
8
9*****************************************************************************/
10#include <linux/kernel.h>
11#include "csr_formatted_io.h"
12
13s32 CsrSnprintf(char *dest, size_t n, const char *fmt, ...)
14{
15    s32 r;
16    va_list args;
17    va_start(args, fmt);
18    r = vsnprintf(dest, n, fmt, args);
19    va_end(args);
20
21    if (dest && (n > 0))
22    {
23        dest[n - 1] = '\0';
24    }
25
26    return r;
27}
28

Archive Download this file



interactive