.\" This file uses -man macros.
.\"	@(#)printf.3s	6.3 (Berkeley) 6/5/86
.\"
.TH IINC 2v "Sept 15, 1987" "PRPQ 5799-CGZ: IBM 4.3/RT, Rel 1 " " "
.SH NAME
iinc, idec \- increment or decrement an inode's link count
.SH SYNOPSIS
.B "iinc(dev, inode,volumeid)"
.br
.B "idec(dev, inode,volumeid)"
.SH DESCRIPTION
.I Iinc
increments by one the link count of
.I inode
on the mounted filesystem partition specified by
.I dev.
.I Idec
decrements the link count by one  If the link count is reduced to 0, and no processes have the inode open, the inode is deallocated and all disk resources associated with it are reclaimed.  
.PP
Only the super user can successfully execute these calls.  The calls are only valid on inodes allocated by
.IR .icreate(2v) ). 
.PP
The inode must be stamped with
.I p1
(the first parameter originally specified to
.IR icreate ).
.SH "RETURN VALUE"
Upon successful completion, a value of 0 is returned.  Otherwise, a value of -1 is returned and
.I errno
is set to indicate the error.
.SH ERRORS
These calls can fail for one of the following principle reasons:
.PP
.B [ENXIO]
	The specified device does not exist or is not mounted, or
.I inode
is not stamped with
.I p1.
.br
.B [EPERM]
	The caller is not the super user.  The specified inode was found, but was not created by icreate.
.br
.B [ENOENT]
	The specified inode is not an active, regular file.
.PP
Be prepared for other, unspecified errors.

SEE ALSO
icreate(2i), iopen(2i), iread(2i), iwrite(2i), vfsck(8v)
