Unix-system-calls-llseek

提供:Dev Guides
移動先:案内検索

[top]#

|http://www.google.com/[Google] | a|

Web This Site
  • 初心者向けのUnix *
  • 高度なUnix *

選択した読書

Copyright©2014 by finddevguides

[cols=",,,,,,,",]

| |  Home   | |  References   | |  Discussion Forums   | |  About TP  

[width="100%",cols="100%",]

a| == llseek()-Unix、Linuxシステムコール

[[File:]] image :http://www.finddevguides.com/images/next.gif [next] image:http://www.finddevguides.com/add- this.gif [AddThisソーシャルブックマークボタン]

広告

NAME

_llseek-読み取り/書き込みファイルオフセットの再配置

概要

#include <sys/types.h> #include <unistd.h> int _llseek(unsigned int fd, unsigned long offset_high, unsigned long offset_low, loff_t* result, unsigned int whence);

説明

*_llseek* ()関数は、ファイル記述子_fd_に関連付けられた開いているファイルのオフセットを_(offset_high << 32)に再配置します| _whence_が *SEEK_SET* 、 *SEEK_CUR* 、または *SEEK_END* であるかどうかに応じて、ファイルの先頭、ファイル内の現在位置、またはファイルの末尾に相対的なoffset_low_バイト。 引数_result_の結果のファイル位置を返します。

返り値

正常に完了すると、 _ llseek ()は0を返します。 それ以外の場合、-1の値が返され、_errno_がエラーを示すために設定されます。

エラー

Tag Description
EBADF fd is not an open file descriptor.
EFAULT Problem with copying results to user space.
*EINVAL * whence is invalid.

準拠

この関数はLinux固有であり、移植性を目的としたプログラムでは使用しないでください。

ノート

Glibcはこのシステムコールのラッパーを提供しません。* syscall *(2)を使用して呼び出します。

関連項目

[[File:]] image :http://www.finddevguides.com/images/next.gif [next] [[File:]]

広告

|  

[cols="^",]

|Advertisements