strnlen (9) Linux Manual Page
strnlen – Find the length of a length-limited string Synopsis size_t strnlen(const char *s, size_t count); Arguments s The string to be sized count The maximum number of bytes to search Copyright
The Linux Manuals (man pages) document is an important part of Linux documents. Linux Manuals are organized as several sections. Each section has a group of commands for a specific area in Linux usage, administration or development.
strnlen – Find the length of a length-limited string Synopsis size_t strnlen(const char *s, size_t count); Arguments s The string to be sized count The maximum number of bytes to search Copyright
strncpy – Copy a length-limited, C-string Synopsis char *strncpy(char *dest, const char *src, size_t count); Arguments dest Where to copy the string to src Where to copy the string from count The maximum number of bytes to copy Description The result is not NUL-terminated if the source exceeds count bytes. In the case where the…
strncmp – Compare two length-limited strings Synopsis int strncmp(const char *cs, const char *ct, size_t count); Arguments cs One string ct Another string count The maximum number of bytes to compare Copyright
strnchr – Find a character in a length limited string Synopsis char *strnchr(const char *s, size_t count, int c); Arguments s The string to be searched count The number of characters to be searched c The character to search for Copyright
strncat – Append a length-limited, C-string to another Synopsis char *strncat(char *dest, const char *src, size_t count); Arguments dest The string to be appended to src The string to append to it count The maximum numbers of bytes to copy Description Note that in contrast to strncpy, strncat ensures the result is terminated. Copyright
strncasecmp – Case insensitive, length-limited string comparison Synopsis int strncasecmp(const char *s1, const char *s2, size_t len); Arguments s1 One string s2 The other string len the maximum number of characters to compare Copyright
strlen – Find the length of a string Synopsis size_t strlen(const char *s); Arguments s The string to be sized Copyright
strlcpy – Copy a C-string into a sized buffer Synopsis size_t strlcpy(char *dest, const char *src, size_t size); Arguments dest Where to copy the string to src Where to copy the string from size size of destination buffer Description Compatible with *BSD: the result is always a valid NUL-terminated string that fits in the buffer…
strlcat – Append a length-limited, C-string to another Synopsis size_t strlcat(char *dest, const char *src, size_t count); Arguments dest The string to be appended to src The string to append to it count The size of the destination buffer. Copyright
strim – Removes leading and trailing whitespace from s. Synopsis char *strim(char *s); Arguments s The string to be stripped. Description Note that the first trailing whitespace is replaced with a NUL-terminator in the given string s. Returns a pointer to the first non-whitespace character in s. Copyright
strcspn – Calculate the length of the initial substring of s which does not contain letters in reject Synopsis size_t strcspn(const char *s, const char *reject); Arguments s The string to be searched reject The string to avoid Copyright
strcpy – Copy a NUL terminated string Synopsis char *strcpy(char *dest, const char *src); Arguments dest Where to copy the string to src Where to copy the string from Copyright
strcmp – Compare two strings Synopsis int strcmp(const char *cs, const char *ct); Arguments cs One string ct Another string Copyright
strchrnul – Find and return a character in a string, or end of string Synopsis char *strchrnul(const char *s, int c); Arguments s The string to be searched c The character to search for Description Returns pointer to first occurrence of ‘c’ in s. If c is not found, then return a pointer to the…
strchr – Find the first occurrence of a character in a string Synopsis char *strchr(const char *s, int c); Arguments s The string to be searched c The character to search for Copyright
strcat – Append one NUL-terminated string to another Synopsis char *strcat(char *dest, const char *src); Arguments dest The string to be appended to src The string to append to it Copyright
starget_for_each_device – helper to walk all devices of a target Synopsis void starget_for_each_device(struct scsi_target *starget, void *data, void (*fn)(struct scsi_device *, void *)); Arguments starget target whose devices we want to iterate over. data Opaque passed to each function call. fn Function to call on each device Description This traverses over each device of starget….
sscanf – Unformat a buffer into a list of arguments Synopsis int sscanf(const char *buf, const char *fmt, …); Arguments buf input buffer fmt formatting of buffer … resulting arguments Copyright
srp_tmo_valid – check timeout combination validity Synopsis int srp_tmo_valid(int reconnect_delay, int fast_io_fail_tmo, int dev_loss_tmo); Arguments reconnect_delay Reconnect delay in seconds. fast_io_fail_tmo Fast I/O fail timeout in seconds. dev_loss_tmo Device loss timeout in seconds. Description The combination of the timeout parameters must be such that SCSI commands are finished in a reasonable time. Hence do not…
srp_stop_rport_timers – stop the transport layer recovery timers Synopsis void srp_stop_rport_timers(struct srp_rport *rport); Arguments rport SRP remote port for which to stop the timers. Description Must be called after srp_remove_host and scsi_remove_host. The caller must hold a reference on the rport (rport->dev) and on the SCSI host (rport->dev.parent). Authors James Bottomley <James.Bottomley [at] hansenpartnership.com> Author….