Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fd_truncate(3H) — Pixar HSI 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fd_stat(3H)

fd(5)

FD_TRUNCATE(3H)  —  Pixar Programmer’s Manual — libfd

NAME

fd_truncate− reduce the size of a fast-disk file

SYNOPSIS

#include <fd.h>

fd_truncate(path, newsize)
char ∗path;
fdoff_t newsize;

DESCRIPTION

Fd_truncate reduces the size of the Fast-Disk file specified by path to newsize bytes.  Disk space reclaimed by this call is returned to the free block list of the filesystem. 

Newsize must not be greater than the file’s current size (see fd_stat(3H)).

RETURN VALUE

A 0 value is returned if the operation succeeds; otherwise fd_truncate returns -1 and the global variable errno indicates the reason for the failure. 

ERRORS

[ENOTDIR] A component of the path prefix is not a directory. 

[ENOENT] The named file does not exist. 

[EISDIR] Path specifies an existing directory. 

[EROFS] Path specifies a file on a read-only filesystem. 

[ENOSPC] Newsize is greater than the file’s current size. 

[EIO] An I/O error occurred while making the directory entry or allocating space. 

[ENOMEM] No memory was available in the user’s process to allocate various resources. 

SEE ALSO

fd_stat(3H), fd(5)

Release β  —  Last change: 10/12/88

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026