Giter VIP home page Giter VIP logo

Comments (10)

1ace avatar 1ace commented on May 10, 2024 1

@deliciouslytyped I guess not 😅 but also I have no memory of any of this, and I don't have a clone of this repo anymore, so I think whatever I did was lost a long time ago 🤷

from btfs.

johang avatar johang commented on May 10, 2024

I have thought about this too. There is no obvious way to output status like that since there is no UI. You can get some status out of it if you run it in foreground with the "-f" flag, but it won't print much.

from btfs.

hvenev avatar hvenev commented on May 10, 2024

ioctl?

from btfs.

JDevlieghere avatar JDevlieghere commented on May 10, 2024

How about creating a status or log file in the root of the mounted directory? I have no experience with FUSE (yet) but I'd be glad to look into this.

from btfs.

vi avatar vi commented on May 10, 2024

Simplest first step: logging to stderr when -o debug.

from btfs.

1ace avatar 1ace commented on May 10, 2024

@JDevlieghere the problem with having a reserved file for that purpose is that you have to account for filename clashes: what do you do when there's also a file with that name in the BT package?

I like the ioctl idea though. It should be a simple case of adding:

static int btfs_ioctl(const char *path, int cmd, void *arg, struct fuse_file_info *fi, unsigned int flags, void *data)
{
  // error handling

  switch(cmd)
  {
    // …
  }
}

and

btfs_ops.ioctl = btfs_ioctl;

and then adding new options in main() to print relevant informations.

from btfs.

johang avatar johang commented on May 10, 2024

@1ace is right about the name clashing problem.

Another way is to have a log file in the generated target directory (see the populate_target function.) It's not very convenient for a user since the path to that directory is random and non-obvious, but very easy to implement. It would mean save_path is changed to /home/X/btfs/btfs-XXXXXX/files (instead of /home/X/btfs/btfs-XXXXXX as of today) and log is written to /home/X/btfs/btfs-XXXXXX/status.log.

from btfs.

1ace avatar 1ace commented on May 10, 2024

I actually started working on an ioctl-based solution where you can simply btfs -s somefile and get the status of this file. I'll probably PR it this weekend :)

from btfs.

deliciouslytyped avatar deliciouslytyped commented on May 10, 2024

@1ace did you ever get anywhere with this?

from btfs.

deliciouslytyped avatar deliciouslytyped commented on May 10, 2024

Ok I finally discovered btfsstat is supposed to do this.

from btfs.

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.