From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Thu, 27 Feb 2020 14:21:37 +0100 Message-Id: <20200227132137.21330-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Subject: [ptxdist] [PATCH] unfs3: fix attribute settings, second try List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de VGhlIGxhc3QgY2hhbmdlIHRvIHVuZnMzIHJlcGFpcmVkIHNvbWUgdGhpbmdzIGZvciBzeW1saW5r cyBidXQgaW4gcmV0dXJuCmJyb2tlIHN0dWZmIGZvciByZWd1bGFyIGZpbGVzLgoKV2l0aCB0aGlz IGNoYW5nZSB0aGUgcHJldmlvdXMgYXR0ZW1wdCBpcyByZXBsYWNlZCBieSBzb21ldGhpbmcgYmV0 dGVyCnRlc3RlZCBub3cuCgpJbnN0ZWFkIG9mIGxldHRpbmcgdW5mcyBvcGVuIHRoZSBmaWxlIHRv IGFkYXB0LCB1c2UgZmNobW9kYXQoKSBldCBhbCwKd2hpY2ggYXJlIHJhY3kgaWYgdGhlIHVuZGVy bGF5aW5nIGZpbGVzeXN0ZW0gY2hhbmdlcywgYnV0IG9uIHRoZSBuZnMKc2lkZSBpdCBpcyBmaW5l LgoKRml4ZXM6IDRlMjFiNDkwZWIyOCAoInVuZnMzOiBmaXggYXR0cmlidXRlIHNldHRpbmcgZm9y IHN5bWxpbmtzIikKU2lnbmVkLW9mZi1ieTogVXdlIEtsZWluZS1Lw7ZuaWcgPHUua2xlaW5lLWtv ZW5pZ0BwZW5ndXRyb25peC5kZT4KLS0tCiAuLi5uLXQtb3Blbi1hLWZpbGUtdG8tc2V0LWl0cy1h dHRyaWJ1dGUucGF0Y2ggfCAyNDY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GF0YV92YWw7CistICAgIGludCByZXMsIGZkOworLSAgICB1aWRfdCBuZXdfdWlkOworLSAg ICBnaWRfdCBuZXdfZ2lkOworLSAgICBiYWNrZW5kX3N0YXRzdHJ1Y3QgYnVmOworLQorLSAgICBy ZXMgPSBiYWNrZW5kX2xzdGF0KHBhdGgsICZidWYpOworLSAgICBpZiAocmVzICE9IDApCistCXJl dHVybiBORlMzRVJSX1NUQUxFOworLQorLSAgICAvKiAKKy0gICAgICogZG9uJ3Qgb3BlbigyKSBk ZXZpY2Ugbm9kZXMsIGl0IGNvdWxkIHRyaWdnZXIKKy0gICAgICogbW9kdWxlIGxvYWRpbmcgb24g dGhlIHNlcnZlcgorLSAgICAgKi8KKy0gICAgaWYgKFNfSVNCTEsoYnVmLnN0X21vZGUpIHx8IFNf SVNDSFIoYnVmLnN0X21vZGUpKQorLQlyZXR1cm4gc2V0X2F0dHJfdW5zYWZlKHBhdGgsIG5maCwg bmV3KTsKKy0KKy0jaWZkZWYgU19JU0xOSworLSAgICAvKiAKKy0gICAgICogb3BlbmluZyBhIHN5 bWxpbmsgd291bGQgb3BlbiB0aGUgdW5kZXJseWluZyBmaWxlLAorLSAgICAgKiBkb24ndCB0cnkg dG8gZG8gdGhhdAorLSAgICAgKi8KKy0gICAgaWYgKFNfSVNMTksoYnVmLnN0X21vZGUpKQorLQly ZXR1cm4gc2V0X2F0dHJfdW5zYWZlKHBhdGgsIG5maCwgbmV3KTsKKy0jZW5kaWYKKy0KKy0gICAg LyogCistICAgICAqIG9wZW4gb2JqZWN0IGZvciBhdG9taWMgc2V0dGluZyBvZiBhdHRyaWJ1dGVz CistICAgICAqLworLSAgICBmZCA9IGJhY2tlbmRfb3BlbihwYXRoLCBPX1dST05MWSB8IE9fTk9O QkxPQ0spOworLSAgICBpZiAoZmQgPT0gLTEpCistCWZkID0gYmFja2VuZF9vcGVuKHBhdGgsIE9f UkRPTkxZIHwgT19OT05CTE9DSyk7CistCistICAgIGlmIChmZCA9PSAtMSkKK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