- len = rec->data_len/sizeof(i);
- for (i=1; i<=1000; i++) {
- p = (int *)rec->data;
- for (j=0; j<len; j++) {
- *p++ = i;
- }
- if (!write_record_to_block(block, rec)) {
- Pmsg0(0, _("Error writing record to block.\n"));
- goto bail_out;
- }
- if (!write_block_to_dev(dcr)) {
- Pmsg0(0, _("Error writing block to device.\n"));
- goto bail_out;
- }
- }
- Pmsg1(0, _("Wrote 1000 blocks of %d bytes.\n"), rec->data_len);
- weofcmd();
- for (i=1001; i<=2000; i++) {
- p = (int *)rec->data;
- for (j=0; j<len; j++) {
- *p++ = i;
- }
- if (!write_record_to_block(block, rec)) {
- Pmsg0(0, _("Error writing record to block.\n"));
- goto bail_out;
- }
- if (!write_block_to_dev(dcr)) {
- Pmsg0(0, _("Error writing block to device.\n"));
- goto bail_out;
- }
- }
- Pmsg1(0, _("Wrote 1000 blocks of %d bytes.\n"), rec->data_len);
- weofcmd();
- if (dev->has_cap(CAP_TWOEOF)) {
- weofcmd();
- }