carta
sc_write_record(3)

sc_write_record3

Write a record to a file

Overview

This function writes a record that is buflen bytes long from the buffer pointed to by buf to a record-structured elementary file (EF) on card. The function corresponds to the ISO 7816 WRITE RECORD function. Call sc_select_file() first to select the file to write to.

record specifies the ID of the record to be written, or, if flags is set to SC_RECORD_BY_REC_NR, the record number. If record is set to zero, the current record will be read.

This function is used for newly created files only; for updating or appending to existing files, see the sc_update_record() and sc_append_record() functions, respectively.

Return value

Returns the number of bytes written if successful, or a negative value in case of error.

History

  • Debian 6.0 (Squeeze): the text shown here
  • Debian 5.0 (Lenny)
  • Debian 4.0 (Etch)

From libopensc2-dev 0.11.13-1.1 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.