summaryrefslogtreecommitdiffstats
path: root/fs/sysfs/bin.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-26 10:40:28 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-26 10:40:28 -0800
commited803862954528e6fcf7bd0f2b2e5a772a7c3281 (patch)
treefce02fe5ebc10a5a8da5e034e2bb25d79d07a808 /fs/sysfs/bin.c
parent6aeea60aee945449c93d9aa70638deeb5c4c5439 (diff)
parentc0e69a5bbc6fc74184aa043aadb9a53bc58f953b (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: klist.c: bit 0 in pointer can't be used as flag debugfs: introduce stub for debugfs_create_size_t() when DEBUG_FS=n sysfs: fix problems with binary files PNP: fix broken pnp lowercasing for acpi module aliases driver core: Convert '/' to '!' in dev_set_name()
Diffstat (limited to 'fs/sysfs/bin.c')
-rw-r--r--fs/sysfs/bin.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c
index 66f6e58a7e4b..f2c478c3424e 100644
--- a/fs/sysfs/bin.c
+++ b/fs/sysfs/bin.c
@@ -63,6 +63,9 @@ read(struct file *file, char __user *userbuf, size_t bytes, loff_t *off)
int count = min_t(size_t, bytes, PAGE_SIZE);
char *temp;
+ if (!bytes)
+ return 0;
+
if (size) {
if (offs > size)
return 0;
@@ -131,6 +134,9 @@ static ssize_t write(struct file *file, const char __user *userbuf,
int count = min_t(size_t, bytes, PAGE_SIZE);
char *temp;
+ if (!bytes)
+ return 0;
+
if (size) {
if (offs > size)
return 0;
id='n75' href='#n75'>75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
<!doctype html>
<html lang=en-us>
<head>
    <meta charset=utf-8>
    <title>NetData: Get control of your Linux Servers. Simple. Effective. Awesome.</title>
    <meta name=author content="Costa Tsaousis">
    <meta name=description content="Unparalleled insights, in real-time, of everything happening on your Linux systems and applications, with stunning, interactive web dashboards and powerful performance and health alarms.">

    <meta name=viewport content="width=device-width,initial-scale=1">
    <link rel=apple-touch-icon href=apple-touch-icon.png>
    <link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAACNklEQVRYhcXXv2tUQRAH8M+FEIJISBHCIWIhIQSUILERi4AiiqCggiIiomAjlhaC4j+ghYWISgqNohZaCBZBC8Ei8QdEUCutFBsxCBqDYkgci/cunkfuJffjJQPD8mZm5/vd2WV2HzlJ0Bs8CvrywsgCHwy+BpGOg0sJfjj4nYKX9FdwKG9gwZlgtgK8pLOpPxfw1mCoCnClDgWtzQTvCEYWCV7SkWAlFBoEb8dlDKBF8t2bMWUSH/AHr3CiEfz5CPUusPJLkRCdk5ZqyeqUrQv4R7E5TwK7M3zTeIKduRAIitiWEfIY69GdCwGcRFuG/xqONRkzkaA7+J5x+MaDtWmHvJ4HgeEM8Nn0bridfv9HoOFyBAdwJCPkqqTzHWwUaz7wgeBHxupfBKuCj2W25mxBsCGYyAB/FxTT27HcPlyep64tCLbjKbqqhLzBlgKfF8pVE4FgRXABI+ioEnYfOyzcFWsCbg+OV+xlpU4ER4O+4HVwL51b3xYEXcGu4Ao+YQhr5gmdxHmsQyfG0b/YxbWmLfRWmnxa0s06VbTMCpnBS9zFzQKTwR5cXCzwHIE02Sl8wSZsRI/kgLVJqjSd+t9LVjiG1diPszhdK3A5gR48k5zYMTwscC59sfT799CYKvA8EttbSeXgTr3gJQKl91kR+yTlvyG5uUbLYh9gb+ovltkb6qYtNSRo3kOygsBSzGlKsubf43USWLYK5CLLXoFWyU/CtzLbVDpW2n+m40yN9ukqdvAX9ac/EIgOapcAAAAASUVORK5CYII=">

    <meta property="og:url"                content="https://my-netdata.io/infographic.html" />
    <meta property="og:type"               content="website" />
    <meta property="og:title"              content="netdata infographic" />
    <meta property="og:description"        content="Unparalleled insights, in real-time, of everything happening on your Linux systems and applications, with stunning, interactive web dashboards and powerful performance and health alarms." />
    <meta property="og:image"              content="https://cloud.githubusercontent.com/assets/2662304/25580009/bf7016a4-2e85-11e7-9a7a-b36c57db7b91.png" />
    <meta property="og:image:type"         content="image/png" />
    <meta property="fb:app_id"             content="1200089276712916" />

    <meta name="twitter:card"              content="summary" />
    <meta name="twitter:site"              content="@linuxnetdata" />
    <meta name="twitter:title"             content="netdata infographic" />
    <meta name="twitter:description"       content="Unparalleled insights, in real-time, of everything happening on your Linux systems and applications, with stunning, interactive web dashboards and powerful performance and health alarms." />
    <meta name="twitter:image"             content="https://cloud.githubusercontent.com/assets/2662304/25580009/bf7016a4-2e85-11e7-9a7a-b36c57db7b91.png" />

    <meta name="google-site-verification" content="3Xmk2kyCvai8p9HEnYHoQ9RBW20-b1NvPAgu07Fkkds" />
    <meta name="msvalidate.01" content="896DCA31C9A664CE359FCF1A645DD476" />

    <style>/*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */
    html {
        line-height: 1.15;
        -ms-text-size-adjust: 100%;
        -webkit-text-size-adjust: 100%;
        font: 17px/1.4 'Open Sans', sans-serif;
        text-align: center
    }
    </style>
</head>
<body>
<div style="width: 100%;text-align:center;">
    <div>
        <p style="font-size: 16pt">
        <b>Interactive infographic of netdata features and functions</b>
        </p>
        <p>
            Hover and click on the infographic, to open the related wiki page.
            <br/>
            <small>
                The links and the docs are still a work in progress.
                The interactive infographic is a feature of <b>draw.io</b>.
            </small>
        </p>
    </div>
    <div class=site-footer role=contentinfo>
        <p>
        <div style="display: inline-block;">
            <div style="vertical-align:top;display:inline-block; height: 34px;margin-top:3px;"><a class=twitter-share-button href=https://twitter.com/share data-count=none data-lang=en data-via=linuxnetdata data-size=small data-text="Get control of your Linux servers. Simple. Effective. Awesome." data-url=https://my-netdata.io/infographic.html >Tweet</a></div>
            <div style="vertical-align:top;display:inline-block; height: 34px;margin-top:3px;"><a class=twitter-follow-button href=https://twitter.com/linuxnetdata data-show-count=false data-lang=en data-size=small>Follow @linuxnetdata</a></div>
        </div>
        <div style="display: inline-block;">
            <div class="fb-like" data-href="https://my-netdata.io/" data-layout="button" data-action="like" data-show-faces="false" data-share="false" style="vertical-align:top;display:inline-block; height: 34px;"></div>
            <div class="fb-share-button" data-href="https://my-netdata.io/" data-layout="button" data-size="small" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fmy-netdata.io%2Finfographic.html&amp;src=sdkpreparse" style="vertical-align:top;display:inline-block; height: 34px;">Share</a></div>
        </div>
    </div>
    <div>
        <p style="font-size: 14pt">
            <b>New to netdata?</b> <a href="//my-netdata.io" target="_blank">Have a look at a netdata demo</a>. You will love it!
        </p>
        <p>
            <embed style="padding-top: 10px; padding-botton: 25px;" src="//registry.my-netdata.io/api/v1/badge.svg?chart=netdata.registry_entries&dimensions=persons&label=user%20base&units=null&value_color=blue&precision=0&v42" type="image/svg+xml" height="20" />
            <embed style="padding-top: 10px; padding-botton: 25px;" src="//registry.my-netdata.io/api/v1/badge.svg?chart=netdata.registry_entries&dimensions=machines&label=servers%20monitored&units=null&value_color=orange&precision=0&v42" type="image/svg+xml" height="20" />
            <embed style="padding-top: 10px; padding-botton: 25px;" src="//registry.my-netdata.io/api/v1/badge.svg?chart=netdata.registry_sessions&label=sessions%20served&units=null&value_color=yellowgreen&precision=0&v42" type="image/svg+xml" height="20" />
        </p>
        <hr/>
    </div>
    <div style="width:90%;display:inline-block;max-width:1300px;text-align:left;">
        <div id="drawing" class="mxgraph" style="max-width:100%;border:1px solid transparent;"></div>
    </div>
</div>
</body>

<script>
    var opts = {
		"highlight":"#0000ff",
		"target":"blank",
		"lightbox":false,
		"nav":false,
		"resize":true,
		"toolbar":"",
		"auto-fit":true,
		"check-visible-state":false,
		"edit":"https://raw.githubusercontent.com/ktsaou/netdata/master/diagrams/netdata-overview.xml",
		"url":"https://raw.githubusercontent.com/ktsaou/netdata/master/diagrams/netdata-overview.xml"
	};
	document.getElementById("drawing").dataset.mxgraph = JSON.stringify(opts);
</script>

<script>
    if(window.location.hostname != 'my-netdata.io' || window.location.protocol != 'https:') {
        var canonical = document.createElement('link');
        canonical.rel = 'canonical';
        canonical.href = 'https://my-netdata.io/infographic.html';
        document.head.appendChild(canonical);
    }
</script>

<script>!function (t, e) {
    "use strict";
    function a(t, n) {
        return t.hasAttribute(n) === !0 ? t : t.parentNode !== r.body ? a(t.parentNode, n) : e
    }

    function n(n) {
        var o, i, r, c, g, u = a(n.target, "data-ga-action"), l = !1;
        u !== e && (o = u.getAttribute("data-ga-action") || e, i = u.getAttribute("data-ga-category") || e, r = u.getAttribute("data-ga-label") || e, c = u.getAttribute("href"), g = parseInt(u.getAttribute("data-ga-value"), 10) || e, ga !== e && i !== e && o !== e && (n.preventDefault(), "Download" !== i && n.ctrlKey !== !0 && n.metaKey !== !0 && 2 !== n.which || (l = !0, t.open(c)), function (a) {
            var n;
            ga("send", "event", i, o, r, g, {
                hitCallback: function () {
                    l === !1 && (n !== e && clearTimeout(n), t.location = a)
                }
            }), n = setTimeout(function () {
                l === !1 && (t.location.href = a)
            }, 1e3)
        }(c)))
    }

    function o() {
        !function (t, e, a, n, o, i) {
            t.GoogleAnalyticsObject = n, t[n] || (t[n] = function () {
                (t[n].q = t[n].q || []).push(arguments)
            }), t[n].l = +new Date, o = e.createElement(a), i = e.getElementsByTagName(a)[0], o.src = "//www.google-analytics.com/analytics.js", i.parentNode.insertBefore(o, i)
        }(t, r, "script", "ga"), ga("create", "UA-64295674-3", "auto"), ga("send", "pageview"), t.document.addEventListener("click", n)
    }

    function i() {
        !function (t, e, a) {
            var n, o = t.getElementsByTagName(e)[0];
            t.getElementById(a) || (n = t.createElement(e), n.id = a, n.src = "//platform.twitter.com/widgets.js", o.parentNode.insertBefore(n, o))
        }(r, "script", "twitter-wjs")
    }

    var r = t.document;
    o(), t.onload = i
}(window)</script>

<!-- facebook sdk -->
<div id="fb-root"></div>
<script>
    window.fbAsyncInit = function() {
        FB.init({
            appId      : '1200089276712916',
            xfbml      : true,
            version    : 'v2.8'
        });
    };

    (function(d, s, id){
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id))