[haiku-commits] haiku: hrev47581 - src/kits/network/libnetapi

  • From: revol@xxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 28 Jul 2014 00:13:04 +0200 (CEST)

hrev47581 adds 3 changesets to branch 'master'
old head: 36f3164c3ec5f536550e443aeec4b0d58a8746b1
new head: 948a1bb3ce67a63d9122ff6716029ed30433d582
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=948a1bb+%5E36f3164

----------------------------------------------------------------------------

cb85a59: Typo: EPLF, not EPFL, we're not in Lausanne ;-)

9535708: Add Unix permission bits to the EPLF listing
  
  As per http://cr.yp.to/ftp/list/eplf.html
  
  Really just for completeness, not even sure Webkit will use it.

948a1bb: Add identifier (device.node) to the EPLF listing
  
  Probably not used by WebKit either...

                                          [ François Revol <revol@xxxxxxx> ]

----------------------------------------------------------------------------

1 file changed, 18 insertions(+), 10 deletions(-)
src/kits/network/libnetapi/FileRequest.cpp | 28 +++++++++++++++++---------

############################################################################

Commit:      cb85a59325005e46d6b5ea60fa8f8eeab26f23db
URL:         http://cgit.haiku-os.org/haiku/commit/?id=cb85a59
Author:      François Revol <revol@xxxxxxx>
Date:        Sat Jul 26 22:48:13 2014 UTC

Typo: EPLF, not EPFL, we're not in Lausanne ;-)

----------------------------------------------------------------------------

diff --git a/src/kits/network/libnetapi/FileRequest.cpp 
b/src/kits/network/libnetapi/FileRequest.cpp
index e5db0fe..21a897a 100644
--- a/src/kits/network/libnetapi/FileRequest.cpp
+++ b/src/kits/network/libnetapi/FileRequest.cpp
@@ -117,31 +117,31 @@ BFileRequest::_ProtocolLoop()
        char name[B_FILE_NAME_LENGTH];
        BEntry entry;
        while (directory.GetNextEntry(&entry) != B_ENTRY_NOT_FOUND) {
-               // We read directories using the EPFL (Easily Parsed List 
Format)
+               // We read directories using the EPLF (Easily Parsed List 
Format)
                // This happens to be one of the formats that WebKit can 
understand,
                // and it is not too hard to parse or generate.
                // http://tools.ietf.org/html/draft-bernstein-eplf-02
-               BString epfl("+");
+               BString eplf("+");
                if (entry.IsFile() || entry.IsSymLink()) {
-                       epfl += "r,";
+                       eplf += "r,";
                        off_t fileSize;
                        if (entry.GetSize(&fileSize) == B_OK)
-                               epfl << "s" << fileSize << ",";
+                               eplf << "s" << fileSize << ",";
 
                } else if (entry.IsDirectory())
-                       epfl += "/,";
+                       eplf += "/,";
 
                time_t modification;
                if (entry.GetModificationTime(&modification) == B_OK)
-                       epfl << "m" << modification << ",";
+                       eplf << "m" << modification << ",";
 
                entry.GetName(name);
-               epfl << "\t" << name << "\r\n";
+               eplf << "\t" << name << "\r\n";
                if (fListener != NULL) {
-                       fListener->DataReceived(this, epfl.String(), 
transferredSize,
-                               epfl.Length());
+                       fListener->DataReceived(this, eplf.String(), 
transferredSize,
+                               eplf.Length());
                }
-               transferredSize += epfl.Length();
+               transferredSize += eplf.Length();
        }
 
        if (fListener != NULL)

############################################################################

Commit:      9535708ba4cc738060f8221897967bf707a3ad79
URL:         http://cgit.haiku-os.org/haiku/commit/?id=9535708
Author:      François Revol <revol@xxxxxxx>
Date:        Sat Jul 26 23:03:34 2014 UTC

Add Unix permission bits to the EPLF listing

As per http://cr.yp.to/ftp/list/eplf.html

Really just for completeness, not even sure Webkit will use it.

----------------------------------------------------------------------------

diff --git a/src/kits/network/libnetapi/FileRequest.cpp 
b/src/kits/network/libnetapi/FileRequest.cpp
index 21a897a..79db569 100644
--- a/src/kits/network/libnetapi/FileRequest.cpp
+++ b/src/kits/network/libnetapi/FileRequest.cpp
@@ -135,6 +135,10 @@ BFileRequest::_ProtocolLoop()
                if (entry.GetModificationTime(&modification) == B_OK)
                        eplf << "m" << modification << ",";
 
+               mode_t permissions;
+               if (entry.GetPermissions(&permissions) == B_OK)
+                       eplf << "up" << BString().SetToFormat("%03o", 
permissions) << ",";
+
                entry.GetName(name);
                eplf << "\t" << name << "\r\n";
                if (fListener != NULL) {

############################################################################

Revision:    hrev47581
Commit:      948a1bb3ce67a63d9122ff6716029ed30433d582
URL:         http://cgit.haiku-os.org/haiku/commit/?id=948a1bb
Author:      François Revol <revol@xxxxxxx>
Date:        Sat Jul 26 23:13:10 2014 UTC

Add identifier (device.node) to the EPLF listing

Probably not used by WebKit either...

----------------------------------------------------------------------------

diff --git a/src/kits/network/libnetapi/FileRequest.cpp 
b/src/kits/network/libnetapi/FileRequest.cpp
index 79db569..9e7b296 100644
--- a/src/kits/network/libnetapi/FileRequest.cpp
+++ b/src/kits/network/libnetapi/FileRequest.cpp
@@ -139,6 +139,10 @@ BFileRequest::_ProtocolLoop()
                if (entry.GetPermissions(&permissions) == B_OK)
                        eplf << "up" << BString().SetToFormat("%03o", 
permissions) << ",";
 
+               node_ref ref;
+               if (entry.GetNodeRef(&ref) == B_OK)
+                       eplf << "i" << ref.device << "." << ref.node << ",";
+
                entry.GetName(name);
                eplf << "\t" << name << "\r\n";
                if (fListener != NULL) {


Other related posts:

  • » [haiku-commits] haiku: hrev47581 - src/kits/network/libnetapi - revol