osPfsGetLabel osPfsGetLabel (function)

Reads the label of a Controller Pak


#include <ultra64.h>        /* os.h */
s32 osPfsGetLabel(OSPfs *pfs,  u8 *label,  int *length);


A BLOCKSIZE (32 bytes) label area exists in the Controller Pak. osPfsGetLabel reads the label of a Controller Pak. The specification for this label area has not yet been defined (as of December, 1998.) Therefore, do not use this function.

The OSPfs structure's handle pfs must be the handle initialized with from osPfsInitPak. Please refer to osPfsInitPak for information on how to create this handle.

The area specified by the label needs to have the size BLOCKSIZE to store label data.

If this function is called successfully, 0 is returned and the length of the label is returned to the location pointed to by the length argument. If an error occurs, one of the following error codes is returned:

Either the Controller Pak is not inserted into the specified Controller or the Controller is not properly connected. To determine which is the case, use osContStartQuery or osContGetQuery.

A different Controller Pak has been inserted. To use the inserted Controller Pak, initialize it by calling osPfsInitPak.

Data transfer to or from the Controller has failed. If a transfer error occurs, up to three tries will be done internally. Therefore, it is rather rare to see this error. If this error has returned, it is possible that either the Controller is not connected properly, or the Controller Pak or Controller Socket is damaged.

See Also

osContInit, osContStartQuery, osContGetQuery, osPfsChecker, osPfsInitPak, osPfsIsPlug, and osPfsSetLabel

Revision History

1999/02/01 Completely revised
1999/04/30 Changed format