1SC_UPDATE_RECORD(3)          OpenSC API reference          SC_UPDATE_RECORD(3)
2
3
4

NAME

6       sc_update_record - Write a record to an existing file
7

SYNOPSIS

9          #include <opensc.h>
10
11          int sc_update_record(struct sc_card *card, unsigned int record,
12                               const unsigned char *buf, size_t buflen,
13                               unsigned long flags);
14
15
16

DESCRIPTION

18       This function writes a record that is buflen bytes long from the buffer
19       pointed to by buf to a record-structured elementary file (EF) on card.
20       The function corresponds to the ISO 7816 UPDATE RECORD function. Call
21       sc_select_file() first to select the file to write to.
22
23       record specifies the ID of the record to be written, or, if flags is
24       set to SC_RECORD_BY_REC_NR, the record number. If record is set to
25       zero, the current record will be read.
26
27       This function can be used for overwriting existing records only; for
28       appending to files, see the sc_append_record() function.
29

RETURN VALUE

31       Returns the number of bytes written if successful, or a negative value
32       in case of error.
33
34
35
36opensc                            05/04/2007               SC_UPDATE_RECORD(3)
Impressum