Sponsored Content
Top Forums Programming What is use of "char __user *buf"? Post 302836995 by jlliagre on Thursday 25th of July 2013 02:48:37 AM
Old 07-25-2013
This is not regular C and won't compile as is.

You have to look elsewhere to find __user definition. It is very likely a macro that expands to something else, possibly nothing.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

2. Shell Programming and Scripting

awk "Invalid char ' in expession" error

I have an HP PPM (ITG) application that is running an awk command in cygwin bash shell as part of ITG process moving SAP transports on a Windows 2003 server. The awk command checks the first two characters of a file containing return code that was retrieved from the SAP server. It is throwing the... (3 Replies)
Discussion started by: accsam1
3 Replies

3. Solaris

significance of "+" char in SunOS "ls -l" output

Hi, I've noticed that the permissions output from "ls -l" under SunOS differs from Linux in that after the "rwxrwxrwx" field, there is an additional "+" character that may or may not be there. What is the significance of this character? Thanks, Suan (6 Replies)
Discussion started by: sayeo
6 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. Programming

Small query regarding function "char * strerror(int errnum)"

As this function returns the address of the string corressponding to the errno value provided to it. Can someone please let me know where, in the memory, it could be (on freeBSD). The MAN page tells under the BUG section that "For unknown error numbers, the strerror() function will return its... (5 Replies)
Discussion started by: Praveen_218
5 Replies

6. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

7. Shell Programming and Scripting

Move a line containg "char" above line containing "xchar"

Okay, so I have a rather large text file and will have to process many more and this will save me hours of work. I'm not very good at scripting, so bear with me please. Working on Linux RHEL I've been able to filter and edit and clean up using sed, but I have a problem with moving lines. ... (9 Replies)
Discussion started by: rex007can
9 Replies

8. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

9. UNIX for Beginners Questions & Answers

VI editor keeps automatically adding new lines with "P" char ..

Hello, I am on AIX operating system. Recently, when I open any file in vi editor, it starting adding lines automatically with "P" char in the beginning of each line. This also happens when I open crontab ( crontab -e) ..I have looked in to my .profile and nothing has changed in there for such... (4 Replies)
Discussion started by: shethkb
4 Replies
HUMANIZE_NUMBER(9)					   BSD Kernel Developer's Manual					HUMANIZE_NUMBER(9)

NAME
humanize_number, format_bytes -- human readable numbers SYNOPSIS
int humanize_number(char *buf, size_t len, uint64_t number, const char *suffix, int divisor); int format_bytes(char *buf, size_t len, uint64_t number); DESCRIPTION
The humanize_number() function formats the unsigned 64-bit quantity given in number into buf. A space and then suffix is appended to the end. The supplied buf must be at least len bytes long. If the formatted number (including suffix) is too long to fit into buf, humanize_number() divides number by divisor until it will fit. In this case, suffix is prefixed with the appropriate SI designator. Suitable values of divisor are 1024 or 1000 to remain consistent with the common meanings of the SI designator prefixes. The prefixes are: Prefix Description Multiplier k kilo 1024 M mega 1048576 G giga 1073741824 T tera 1099511627776 P peta 1125899906842624 E exa 1152921504606846976 The len argument must be at least 4 plus the length of suffix, in order to ensure a useful result in buf. The format_bytes() function is a front-end to humanize_number(). It calls the latter with a suffix of ``B''. Also, if the suffix in the returned buf would not have a prefix, the suffix is removed. This means that a result of ``100000'' occurs, instead of ``100000 B''. RETURN VALUES
Both functions return the number of characters stored in buf (excluding the terminating NUL) upon success, or -1 upon failure. SEE ALSO
humanize_number(3) HISTORY
These functions first appeared in NetBSD 1.5. BSD
August 7, 2010 BSD
All times are GMT -4. The time now is 06:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy