Launchpad has imported 7 comments from the remote bug at
https://bugs.kde.org/show_bug.cgi?id=245226.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2010-07-20T15:05:51+00:00 karaluh wrote:

Version:           unspecified
OS:                Linux

dolphin displays free space on the right side of the status bar. On
samba shares the bar is empty with Unknown size label.

Reproducible: Didn't try



OS: Linux (i686) release 2.6.32-0206321505-generic
Compiler: cc

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/299946/comments/2

------------------------------------------------------------------------
On 2010-08-02T14:15:19+00:00 FiNeX wrote:

@Peter: Is this information available trough the SMB protocol?

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/299946/comments/3

------------------------------------------------------------------------
On 2010-08-08T11:18:54+00:00 Peter-penz19 wrote:

> @Peter: Is this information available trough the SMB protocol?

@FiNeX: I don't know :-( Dolphin uses KDiskFreeSpaceInfo for getting
this information. I had a short look at the code, but I'm not sure. I
guess David or Sebastian might be able to answer this question off the
bat.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/299946/comments/4

------------------------------------------------------------------------
On 2010-08-11T17:21:36+00:00 David Faure wrote:

I don't know enough about the SMB protocol to answer this.
If SMB provides this info, then we also have to make it available as a kioslave 
special() command, but that's the 2nd step (which I can do). First step: how 
could kio_smb find out the available space on a share? Reassigning to kio_smb.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/299946/comments/5

------------------------------------------------------------------------
On 2010-08-11T20:31:57+00:00 FiNeX wrote:

After some googling I've found the following links:

  http://www.protocols.com/pbook/ibm.htm#SMB
  http://www.protocolbase.net/protocols/protocol_SMB.php

They talk about  "[get server info] Get total and free space for server
disk."

Could this info be useful in some way?

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/299946/comments/6

------------------------------------------------------------------------
On 2010-10-13T12:07:36+00:00 Z-sander wrote:

smbclient shows the free space on remote shares (I just checked in
interactive mode)

It outputs it in a bit strange way, but it's correct:

"34175 blocks of size 8388608. 2269 blocks available"

8388608 = 8192 * 1024, so each block is 8MB

I have absolutely no idea why it uses 8MB blocks, but that's not the
point :)

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/299946/comments/7

------------------------------------------------------------------------
On 2014-01-10T13:58:11+00:00 Mathias Tillman wrote:

Sorry to comment on such an old bug, but this is still not implemented in KDE 
4.12. I know this can be done as I've done it myself using libsmbclient. Here 
is an example implementation that works just fine:
void auth_fn(const char *server, const char *share,
         char *workgroup, int wgmaxlen, char *username, int unmaxlen,
         char *password, int pwmaxlen)
{
    strcpy(username, "guest");
}

bool calculateSMBSpace(char *url, unsigned long long &spaceTotal, unsigned long 
long &spaceFree) {
    int err = smbc_init(auth_fn,  0);
    if (err < 0) {
        return false;
    }

    int handle = smbc_opendir(url);
    if(handle < 0) {
        return false;
    }

    struct statvfs dirStat;
    err = smbc_fstatvfs(handle, &dirStat);
    smbc_closedir(handle);

    if (err < 0) {
        return false;
    }

    spaceTotal = dirStat.f_bsize * dirStat.f_blocks;
    spaceFree = dirStat.f_bsize * dirStat.f_bavail;

    return true;
}

I would write the implementation myself, but I don't know my way around
the KDE code too well and I'm not sure if libsmbclient is cross-platform
which might mean that some OSes would be left out.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/299946/comments/8


** Changed in: kde-baseapps
       Status: Confirmed => Unknown

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/299946

Title:
  Dolphin doesn't show free space on samba shares

To manage notifications about this bug go to:
https://bugs.launchpad.net/kde-baseapps/+bug/299946/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to