Git Product home page Git Product logo

Comments (2)

bwalex avatar bwalex commented on September 15, 2024

I'm a bit at a loss here. Can you try with the following patch and tell me what it says?

Oh boy, that makes no sense, my patch. not my day. Here is an updated one:

diff --git i/io.c w/io.c
index a862422..998d9d7 100644
--- i/io.c
+++ w/io.c
@@ -294,6 +294,8 @@ get_disk_info(const char *dev, disksz_t *blocks, size_t *bsize)
    *blocks = (disksz_t)(nbytes / blocksz);
    *bsize = (size_t)(blocksz);

+   printf("dev: %s, nbytes: %ju, blocksz: %d, blocks: %ju\n", dev, nbytes, blocksz, (uint64_t)*blocks);
+
    close(fd);
    return 0;
 }

from tc-play.

 avatar commented on September 15, 2024

It appears this bug is not present in the latest sources. I downloaded the .zip from github and compiled it with your printf, and that version does the right thing.
I also noticed that tcplay v1.1 from the Debian repo states it will "Completely erase EVERYTHING on /dev/sdb1" when -z is specified; the locally compiled tcplay does not.
Closing this bug.

root@dmz1:~/bin# fdisk -l /dev/sdb

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
81 heads, 63 sectors/track, 191411 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000098ec

Device Boot Start End Blocks Id System
/dev/sdb1 2048 976773167 488385560 83 Linux
root@dmz1:~/bin# ./tcplay -c -d /dev/sdb1 -z
dev: /dev/sdb1, nbytes: 500106813440, blocksz: 512, blocks: 976771120
Passphrase:
Repeat passphrase:
Summary of actions:

  • Create volume on /dev/sdb1

    Are you sure you want to proceed? (y/n) y
    Creating volume headers...
    Depending on your system, this process may take a few minutes as it uses true random data which might take a while to refill
    Writing volume headers to disk...
    All done!
    root@dmz1:~/bin# tcplay -i -d /dev/sdb1
    Passphrase:
    Device: /dev/sdb1
    PBKDF2 PRF: RIPEMD160
    PBKDF2 iterations: 2000
    Cipher: AES-256-XTS
    Key Length: 512 bits
    CRC Key Data: 0x6c0e771b
    Sector size: 512
    Volume size: 976770608 sectors
    IV offset: 256
    Block offset: 256

root@dmz1:~/bin# /usr/sbin/tcplay -c -d /dev/sdb1 -z
Passphrase:
Repeat passphrase:
Summary of actions:

  • Completely erase EVERYTHING on /dev/sdb1

  • Create volume on /dev/sdb1

    Are you sure you want to proceed? (y/n) y
    Creating volume headers...
    Depending on your system, this process may take a few minutes as it uses true random data which might take a while to refill
    Writing volume headers to disk...
    All done!
    root@dmz1:/bin# tcplay -i -d /dev/sdb1
    Passphrase:
    Device: /dev/sdb1
    PBKDF2 PRF: RIPEMD160
    PBKDF2 iterations: 2000
    Cipher: AES-256-XTS
    Key Length: 512 bits
    CRC Key Data: 0xf7458bf9
    Sector size: 512
    Volume size: 3692080 sectors
    IV offset: 256
    Block offset: 256
    root@dmz1:
    /bin# /usr/sbin/tcplay --version
    tcplay v1.1
    root@dmz1:~/bin# ./tcplay --version
    tcplay v2.0

from tc-play.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.