Quantcast

[Mondo-devel] I found why there's no BLK_START_OF_TAPE or BLK_START_OF_BACKUP headers in the tape stream

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Mondo-devel] I found why there's no BLK_START_OF_TAPE or BLK_START_OF_BACKUP headers in the tape stream

David C. Partridge
In libmondo-archive.c at line 1183

        if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
                write_header_block_to_stream((off_t)0, "start-of-tape",
BLK_START_OF_TAPE);
                write_header_block_to_stream((off_t)0, "start-of-backup",
BLK_START_OF_BACKUP);
        }

but in write_header_block_to_stream in libmondo-stream.c at line 1764 it
says:

        if (length_of_incoming_file <= 0) {
                return(1);
        }

so neither of these header blocks are written to the tape.

PS did you get my post with verify.rar attached?  It got held for moderation
with the message:

        Message body is too big: 413074 bytes with a limit of 400 KB

PPS lots of places I see code like
        for (i = 0; i < (int) TAPE_BLOCK_SIZE; i++) {
                tempblock[i] = 0;
        }
I'm curious what you have against memset()?

Dave


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
_______________________________________________
Mondo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mondo-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Mondo-devel] I found why there's no BLK_START_OF_TAPE or BLK_START_OF_BACKUP headers in the tape stream

Bruno Cornec-4
David C. Partridge said on Wed, Dec 21, 2016 at 07:50:29PM +0000:
>PPS lots of places I see code like
> for (i = 0; i < (int) TAPE_BLOCK_SIZE; i++) {
> tempblock[i] = 0;
> }
>I'm curious what you have against memset()?

Myself, nothing ;-) Maybe Hugo Rabson had (he is the one who code that initially)
Myself, I even tend to create mr_* functions to encapsulate system calls to be more portable and to manage better this type of stuff.
But for now, I'm working mainly on suppressing all static allocation on th C code, and I've done that as time permits since 10 years now but there is still work to do.
And of course, fixing issues with new distros to support.

Bruno.
--
Open Source Profession, WW Linux Community Lead     http://www.hpintelco.net
HPE EMEA EG FLOSS Technology Strategist http://www.hpe.com/engage/opensource
FLOSS projects:    http://mondorescue.org         http://project-builder.org
Musique ancienne?   http://www.musique-ancienne.org  http://www.medieval.org

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
_______________________________________________
Mondo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mondo-devel
Loading...